Skip to content

Commit dae094a

Browse files
committed
new article for draft and deploy
1 parent 1306fc1 commit dae094a

File tree

1 file changed

+83
-20
lines changed

1 file changed

+83
-20
lines changed

articles/firewall/draft-deploy.md

Lines changed: 83 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Azure Firewall features
3-
description: Learn about Azure Firewall feature draft and deploy
3+
description: Learn about Azure Firewall feature draft and deployment
44
services: firewall
55
author: vekannan
66
ms.service: azure-firewall
@@ -9,14 +9,14 @@ ms.date: 04/22/2025
99
ms.author: duau
1010
---
1111

12-
# Azure Firewall Draft and Deploy (Preview)
12+
# Azure Firewall Draft + Deployment (Preview)
1313

1414
Organizations are required to make frequent changes to their Firewall Policy for several reasons: onboarding a new application or workload, patching security issue, or for maintenance and optimizing their policy by merging rules or deleting unused rules. These updates can be performed by multiple people, while each update can take up to a few minutes to be deployed.
1515
With Azure Firewall Policy Save & Commit, you can now update your policy in a 2-phased approach:
1616

17-
* Save: Make as many changes as needed, by one or more people, which will be saved in a temporary policy draft (which is cloned from your current applied policy). These changes are extremely fast to make.
17+
* Draft: Make as many changes as needed, by one or more people, which will be saved in a temporary policy draft (which is cloned from your current applied policy). These changes are extremely fast to make.
1818

19-
* Commit: Apply the changes altogether by deploying the draft version and make it your current applied policy.
19+
* Deployment: Apply the changes altogether by deploying the draft version and make it your current applied policy.
2020

2121
In this article, you learn how to:
2222

@@ -29,31 +29,94 @@ In this article, you learn how to:
2929

3030
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
3131

32-
### Use Draft + Commit
32+
If you want to use this feature via CLI, then make sure azure-firewall extenstion version is above [1.2.3](https://github.com/Azure/azure-cli-extensions/releases/tag/azure-firewall-1.2.3)
3333

34-
Azure Firewall's draft and deploy feature allows you to safely test changes in a demo or test environment before applying them to production.
34+
## Use Draft + Deployment
35+
36+
Azure Firewall's draft + deployment feature allows you to make bulk updates to your firewall policy, before applying them to production.
3537

3638
1. In the Azure portal, navigate to your existing firewall policies or create a new one.
37-
1. On the Azure Firewall Policy blade, click **Draft & Deployment**, then select **Create a new draft.** This will create a new draft associated with this policy, which is a 1-1 copy of your current applied policy.
39+
1. On the Azure Firewall Policy blade, under **Management** section click **Draft & Deployment**, then select **Create a new draft.** This creates a draft that is an exact copy of your current applied policy.
3840

39-
:::image type="content" source="media/draft-deploy/Picture1.png" alt-text="screenshot of Draft and Deploy":::
41+
:::image type="content" source="media/draft-deploy/pic1.png" alt-text="screenshot of Draft and Deploy":::
4042

41-
1. On the draft page, make changes or additions to your rules or other settings. These pages are identical to the ones in the deployed draft, but changes you make in a draft will be deployed only when you specifically deploy the draft.
42-
1. Next, return to the **deploy** screen, and select **deploy draft**. Once the draft is deployed, the updated version, including all changes you made in draft, will override the current deployed policy and become the latest version. The draft body itself will be deleted after that. And you will then be able to create a new draft on top of the new deployment again.
43-
1. You can repeat the process as many times as you would like to make further changes to the firewall policy.
43+
:::image type="content" source="media/draft-deploy/pic2.png" alt-text="screenshot of create a draft":::
44+
45+
1. On the draft page, make changes or additions to your rules or settings. These pages are identical to the ones in the deployed draft. These changes will only take effect when you deploy the draft.
46+
:::image type="content" source="media/draft-deploy/pic3.png" alt-text="screenshot of drafting changes":::
47+
48+
1. To verify the changes, return to the **deploy** screen and see the rules or setting changes. To deploy, select **deploy draft**. Once deployed, the draft replaces the current policy and becomes the latest version. The draft itself is deleted after the deployment.
49+
50+
:::image type="content" source="media/draft-deploy/pic4.png" alt-text="screenshot of check changes and deploy":::
51+
52+
1. Repeat the process as needed to make further updates to the firewall policy.
53+
54+
> [!NOTE]
55+
> When using this feature via PowerShell or API, you must first download the current policy and manually create a draft based on it. In contrast, when using the Azure portal or CLI, creating a draft automatically generates it from the existing policy.
4456
45-
# [Powershell](#tab/powershell)
46-
47-
```azurepowershell-interactive
48-
New-AzFirewallPolicyDraft -AzureFirewallPolicyName fw-policy -ResourceGroupName chetan-rg
49-
Set-AzFirewallPolicyDraft -AzureFirewallPolicyName fw-policy -ResourceGroupName chetan-rg -PrivateRange @("99.99.99.0/24", "66.66.0.0/16")
50-
51-
New-AzFirewallPolicyRuleCollectionGroupDraft -AzureFirewallPolicyRuleCollectionGroupName rcg-a -ResourceGroupName chetan-rg -AzureFirewallPolicyName -Priority 200
52-
```
5357
# [CLI](#tab/CLI)
5458
```azurecli-interactive
59+
60+
az login
61+
62+
Create a draft:
63+
az network firewall policy draft create --policy-name fw-policy --resource-group test-rg
64+
65+
Update draft (settings):
66+
az network firewall policy draft update --policy-name fw-policy --resource-group test-rg --threat-intel-mode Off --idps-mode Deny
67+
68+
Update draft (rules):
69+
70+
Create a new RCG in draft:
71+
az network firewall policy rule-collection-group draft create –rule-collection-group-name rcg-b –policy-name fw-policy –resource-group test-rg –priority 303
72+
73+
Update a RCG in draft:
74+
az network firewall policy rule-collection-group draft collection add-nat-collection -n nat_collection_1 --collection-priority 10003 --policy-name fw-policy -g test-rg --rule-collection-group-name rcg-c --action DNAT --rule-name network_rule_21 --description "test" --destination-addresses "202.120.36.15" --source-addresses "202.120.36.13" "202.120.36.14" --translated-address 128.1.1.1 --translated-port 1234 --destination-ports 12000 12001 --ip-protocols TCP UDP
75+
76+
See the Draft:
77+
az network firewall policy draft show --policy-name fw-policy --resource-group test-rg
78+
79+
Deploy Draft:
80+
az network firewall policy deploy --name fw-policy --resource-group test-rg
81+
82+
Discard Draft:
83+
az network firewall policy draft delete --policy-name fw-policy --resource-group test-rg
84+
85+
```
86+
87+
# [PowerShell](#tab/powershell)
88+
89+
```azurepowershell-interactive
90+
91+
Create a draft:
92+
New-AzFirewallPolicyDraft -AzureFirewallPolicyName fw-policy -ResourceGroupName test-rg
93+
94+
Update draft (settings):
95+
Set-AzFirewallPolicyDraft -AzureFirewallPolicyName fw-policy -ResourceGroupName test-rg -ThreatIntelWhitelist $threatIntelWhitelist
96+
97+
Update draft (rules):
98+
Create a new RCG in draft:
99+
New-AzFirewallPolicyRuleCollectionGroupDraft -AzureFirewallPolicyRuleCollectionGroupName rcg-a -ResourceGroupName test-rg -AzureFirewallPolicyName fw-policy -Priority 200
100+
101+
Update a RCG in draft:
102+
$rule1 = New-AzFirewallPolicyApplicationRule -Name "Allow-HTTP" -Protocol "Http:80" -SourceAddress "10.0.0.0/24" -TargetFqdn www.example.com
103+
104+
$rule2 = New-AzFirewallPolicyApplicationRule -Name "Allow-HTTPS-2" -Protocol "Https:443" -SourceAddress "10.0.0.0/24" -TargetFqdn "www.secureexample.com"
105+
106+
$ruleCollection = New-AzFirewallPolicyFilterRuleCollection -Name "Allow-Rules" -Priority 100 -Rule $rule1, $rule2 -ActionType Allow
107+
108+
Set-AzFirewallPolicyRuleCollectionGroupDraft -AzureFirewallPolicyRuleCollectionGroupName rcg-b -ResourceGroupName test-rg -AzureFirewallPolicyName fw-policy -Priority 400 -RuleCollection $ruleCollection
109+
110+
See the draft:
111+
Get-AzFirewallPolicyDraft -AzureFirewallPolicyName fw-policy -ResourceGroupName test-rg
112+
113+
Deploy the draft:
114+
Deploy-AzFirewallPolicy -Name fw-policy -ResourceGroupName test-rg
115+
116+
Discard draft:
117+
Remove-AzFirewallPolicyDraft -AzureFirewallPolicyName fw-policy -ResourceGroupName test-rg
118+
55119
```
56-
# [API](#tab/API)
57120

58121
---
59122

0 commit comments

Comments
 (0)