Skip to content

Commit b9b0a30

Browse files
authored
Merge pull request #298626 from ZarrVenkat/saveandcommit
new article Azure Firewall Draft and Deploy
2 parents 2672ec1 + e25e17a commit b9b0a30

File tree

4 files changed

+193
-0
lines changed

4 files changed

+193
-0
lines changed

articles/firewall/draft-deploy.md

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
---
2+
title: Azure Firewall Draft + Deployment (preview)
3+
description: Learn how to use Azure Firewall's Draft and Deployment feature to make and apply bulk updates to your firewall policies efficiently. This article provides step-by-step guidance on creating, updating, and deploying drafts, along with supported scenarios and limitations.
4+
services: firewall
5+
author: vekannan
6+
ms.service: azure-firewall
7+
ms.topic: concept-article
8+
ms.date: 05/05/2025
9+
ms.author: duau
10+
---
11+
12+
# Azure Firewall Draft + Deployment (preview)
13+
14+
Organizations often need to update their Azure Firewall Policy for various reasons, such as onboarding new applications or workloads, addressing security vulnerabilities, performing maintenance, or optimizing policies by merging or removing unused rules. These updates can involve multiple contributors, and each change can take several minutes to deploy.
15+
16+
>[!IMPORTANT]
17+
> **Azure Firewall Draft + Deployment** is currently in PREVIEW.
18+
> See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
19+
20+
With Azure Firewall Policy Draft + Deployment, you can streamline this process using a two-phase approach:
21+
22+
* **Draft**: Make multiple changes collaboratively, saved in a temporary draft policy cloned from your current applied policy. These changes don't affect the live policy.
23+
24+
* **Deployment**: Apply all changes at once by deploying the draft, replacing the current applied policy with the updated version.
25+
26+
## Supported scenarios and limitations
27+
28+
The Draft and Deployment feature is designed for specific use cases and has certain constraints:
29+
30+
### Supported scenarios
31+
32+
- This feature is exclusively available for Azure Firewall Policies. It doesn't support firewalls configured with classic rules.
33+
34+
### Limitations
35+
36+
- A draft is created as a clone of the currently applied policy. Any changes made to the applied policy after the creation of the draft isn't reflected in the draft unless manually updated.
37+
- Deploying a draft replaces the entire applied policy. Changes made to the applied policy after the draft is created aren't preserved unless they're also added to the draft.
38+
- Creating a new Rule Collection Group (RCG) isn't supported directly within a policy draft.
39+
- Only one draft can exist for a policy at any given time.
40+
41+
## Prerequisites
42+
43+
- If you don't have an Azure subscription, you can create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) to get started.
44+
- To use this feature with the Azure CLI, ensure that you have the Azure Firewall extension installed and updated to version [1.2.3 or later](https://github.com/Azure/azure-cli-extensions/releases/tag/azure-firewall-1.2.3).
45+
46+
> [!NOTE]
47+
> When using this feature through Azure PowerShell or Azure REST API, you must first download the current policy and manually create a draft based on it. In contrast, using the Azure portal or CLI automatically generates a draft from the existing policy.
48+
49+
## Use Draft + Deployment
50+
51+
Azure Firewall Draft + Deployment allows you to make bulk updates to your firewall policy before applying them to production.
52+
53+
# [Portal](#tab/portal)
54+
55+
1. In the Azure portal, navigate to your existing firewall policy or create a new one.
56+
57+
1. On the **Azure Firewall Policy** page, under the **Management** section, select **Draft & Deployment**, then select **Create a new draft**. This creates a draft that is an exact copy of your current applied policy.
58+
59+
1. On the draft page, make changes or additions to your rules or settings. These pages are identical to those in the deployed policy. The changes will only take effect when you deploy the draft.
60+
61+
:::image type="content" source="media/draft-deploy/drafting-changes.png" alt-text="Screenshot showing drafting changes.":::
62+
63+
1. To verify the changes, return to the **Deploy** screen to review the updated rules or settings. To apply the changes, select **Deploy draft**. Once deployed, the draft replaces the current policy and becomes the latest version. The draft is deleted after deployment.
64+
65+
:::image type="content" source="media/draft-deploy/verify-and-deploy-changes.png" alt-text="Screenshot showing verification and deployment of changes.":::
66+
67+
1. Repeat this process as needed to make further updates to your firewall policy.
68+
69+
# [CLI](#tab/CLI)
70+
71+
1. Run the [az login](/cli/azure/authenticate-azure-cli) command to log in to your Azure account:
72+
73+
```azurecli-interactive
74+
az login
75+
```
76+
77+
1. Create a draft using [az network firewall policy draft create](/cli/azure/network/firewall/policy/draft#az-network-firewall-policy-draft-create) command. This command creates a draft of the current applied policy. You can use the `--policy-name` and `--resource-group` parameters to specify the name and resource group of your firewall policy:
78+
79+
```azurecli-interactive
80+
az network firewall policy draft create --policy-name fw-policy --resource-group test-rg
81+
```
82+
83+
1. Update the settings in the draft using the [az network firewall policy draft update](/cli/azure/network/firewall/policy/draft#az-network-firewall-policy-draft-update) command. This command allows you to modify the threat intelligence mode and IDPS mode for the draft. Use the `--threat-intel-mode` parameter to set the desired threat intelligence mode and the `--idps-mode` parameter to configure the intrusion detection and prevention system (IDPS) mode:
84+
85+
```azurecli-interactive
86+
az network firewall policy draft update --policy-name fw-policy --resource-group test-rg --threat-intel-mode Off --idps-mode Deny
87+
```
88+
89+
1. Update Draft Rules
90+
91+
- Create a New Rule Collection Group (RCG) using [az network firewall policy rule-collection-group draft create](/cli/azure/network/firewall/policy/rule-collection-group/draft#az-network-firewall-policy-rule-collection-group-draft-create) command:
92+
93+
```azurecli-interactive
94+
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
95+
```
96+
97+
- Add a NAT Rule Collection to an Existing RCG in the Draft
98+
99+
```azurecli-interactive
100+
az network firewall policy rule-collection-group draft collection add-nat-collection \
101+
--name nat_collection_1 \
102+
--collection-priority 10003 \
103+
--policy-name fw-policy \
104+
--resource-group test-rg \
105+
--rule-collection-group-name rcg-c \
106+
--action DNAT \
107+
--rule-name network_rule_21 \
108+
--description "test" \
109+
--destination-addresses "202.120.36.15" \
110+
--source-addresses "202.120.36.13" "202.120.36.14" \
111+
--translated-address 128.1.1.1 \
112+
--translated-port 1234 \
113+
--destination-ports 12000 12001 \
114+
--ip-protocols TCP UDP
115+
```
116+
117+
1. View the details of the draft using [az network firewall policy draft show](/cli/azure/network/firewall/policy/draft#az-network-firewall-policy-rule-collection-group-draft-show) command:
118+
119+
```azurecli-interactive
120+
az network firewall policy draft show --policy-name fw-policy --resource-group test-rg
121+
```
122+
123+
1. Deploy the draft to apply the changes using [az network firewall policy deploy](/cli/azure/network/firewall/policy#az-network-firewall-policy-deploy) command:
124+
125+
```azurecli-interactive
126+
az network firewall policy deploy --name fw-policy --resource-group test-rg
127+
```
128+
129+
1. Discard the draft if you no longer need it using [az network firewall policy draft delete](/cli/azure/network/firewall/policy/draft#az-network-firewall-policy-rule-collection-group-draft-delete) command:
130+
131+
```azurecli-interactive
132+
az network firewall policy draft delete --policy-name fw-policy --resource-group test-rg
133+
```
134+
135+
# [PowerShell](#tab/powershell)
136+
137+
138+
1. Use the [New-AzFirewallPolicyDraft](/powershell/module/az.network/new-azfirewallpolicydraft) cmdlet to create a draft of the current applied policy. Specify the policy name and resource group:
139+
140+
```powershell-interactive
141+
New-AzFirewallPolicyDraft -AzureFirewallPolicyName fw-policy -ResourceGroupName test-rg
142+
```
143+
144+
1. Use the [Set-AzFirewallPolicyDraft](/powershell/module/az.network/set-azfirewallpolicydraft) cmdlet to update the settings in the draft. For example, you can update the threat intelligence mode and IDPS mode:
145+
146+
```powershell-interactive
147+
Set-AzFirewallPolicyDraft -AzureFirewallPolicyName fw-policy -ResourceGroupName test-rg -ThreatIntelWhitelist $threatIntelWhitelist
148+
```
149+
150+
1. Update draft rules with the following cmdlets:
151+
152+
- Use the [New-AzFirewallPolicyRuleCollectionGroupDraft](/powershell/module/az.network/new-azfirewallpolicyrulecollectiongroupdraft) cmdlet to create a new rule collection group (RCG) in the draft. Specify the RCG name, resource group, and policy name:
153+
154+
```powershell-interactive
155+
New-AzFirewallPolicyRuleCollectionGroupDraft -AzureFirewallPolicyRuleCollectionGroupName rcg-a -ResourceGroupName test-rg -AzureFirewallPolicyName fw-policy -Priority 200
156+
```
157+
- Use the [Set-AzFirewallPolicyRuleCollectionGroupDraft](/powershell/module/az.network/set-azfirewallpolicyrulecollectiongroupdraft) cmdlet to add a NAT rule collection to an existing RCG in the draft:
158+
159+
```powershell-interactive
160+
$rule1 = New-AzFirewallPolicyApplicationRule -Name "Allow-HTTP" -Protocol "Http:80" -SourceAddress "10.0.0.0/24" -TargetFqdn www.example.com
161+
162+
$rule2 = New-AzFirewallPolicyApplicationRule -Name "Allow-HTTPS-2" -Protocol "Https:443" -SourceAddress "10.0.0.0/24" -TargetFqdn "www.secureexample.com"
163+
164+
$ruleCollection = New-AzFirewallPolicyFilterRuleCollection -Name "Allow-Rules" -Priority 100 -Rule $rule1, $rule2 -ActionType Allow
165+
166+
Set-AzFirewallPolicyRuleCollectionGroupDraft -AzureFirewallPolicyRuleCollectionGroupName rcg-b -ResourceGroupName test-rg -AzureFirewallPolicyName fw-policy -Priority 400 -RuleCollection $ruleCollection
167+
```
168+
169+
1. Use the [Get-AzFirewallPolicyDraft](/powershell/module/az.network/get-azfirewallpolicydraft) cmdlet to view the details of the draft:
170+
171+
```powershell-interactive
172+
Get-AzFirewallPolicyDraft -AzureFirewallPolicyName fw-policy -ResourceGroupName test-rg
173+
```
174+
175+
1. Use the [Deploy-AzFirewallPolicy](/powershell/module/az.network/deploy-azfirewallpolicy) cmdlet to apply the changes in the draft to the live policy:
176+
177+
```powershell-interactive
178+
Deploy-AzFirewallPolicy -Name fw-policy -ResourceGroupName test-rg
179+
```
180+
181+
1. If you want to discard the draft without applying the changes, use the [Remove-AzFirewallPolicyDraft](/powershell/module/az.network/remove-azfirewallpolicydraft) cmdlet:
182+
183+
```powershell-interactive
184+
Remove-AzFirewallPolicyDraft -AzureFirewallPolicyName fw-policy -ResourceGroupName test-rg
185+
```
186+
187+
---
188+
189+
## Next steps
190+
> [!div class="nextstepaction"]
191+
> [Deploy and configure Azure Firewall Premium](premium-deploy.md)
90.9 KB
Loading
87.2 KB
Loading

articles/firewall/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ items:
8080
href: premium-certificates.md
8181
- name: Enterprise CA Certificates
8282
href: premium-deploy-certificates-enterprise-ca.md
83+
- name: Draft and Deploy
84+
href: draft-deploy.md
8385
- name: To a hybrid Network
8486
items:
8587
- name: Portal

0 commit comments

Comments
 (0)