Skip to content

Commit e1e999b

Browse files
authored
Merge pull request #205973 from vhorne/waf-migrate
add new line in script
2 parents f248080 + c63b0dd commit e1e999b

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

articles/web-application-firewall/ag/migrate-policy.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
title: Migrate WAF policies for Azure Application Gateway
33
description: Learn how to migrate Azure Web Application Firewall policies using Azure PowerShell.
44
services: web-application-firewall
5-
ms.topic: conceptual
6-
author: KumudD
5+
ms.topic: how-to
6+
author: vhorne
77
ms.service: web-application-firewall
8-
ms.date: 07/30/2021
9-
ms.author: kumud
8+
ms.date: 07/26/2022
9+
ms.author: victorh
1010
ms.custom: devx-track-azurepowershell
1111
---
1212

@@ -20,10 +20,10 @@ For more information about creating a new WAF policy, see [Create Web Applicatio
2020

2121
Use the following steps to run the migration script:
2222

23-
1. Open the following cloud shell window, or open one from within the portal.
24-
2. Copy the script into the cloud shell window and run it.
23+
1. Open the following Cloud Shell window, or open one from within the portal.
24+
2. Copy the script into the Cloud Shell window and run it.
2525
3. The script asks for Subscription ID, Resource Group name, the name of the Application Gateway that the WAF config is associated with, and the name of the new WAF policy that to create. Once you enter these inputs, the script runs and creates your new WAF policy
26-
4. Associate the new WAF policy with your application gateway. Go to the WAF policy in the portal and select the **Associated Application Gateways** tab. Select **Associate an Application Gateway** and then select the Application Gateway to associate the WAF policy to.
26+
4. Verify the new WAF policy is associated with your application gateway. Go to the WAF policy in the portal and select the **Associated Application Gateways** tab. Verify the Application Gateway associated with the WAF policy.
2727

2828
> [!NOTE]
2929
> The script does not complete a migration if the following conditions exist:
@@ -199,6 +199,7 @@ function createNewTopLevelWafPolicy ($subscriptionId, $resourceGroupName, $appli
199199
return
200200
}
201201
202+
$appgw.WebApplicationFirewallConfiguration = $null
202203
$appgw.FirewallPolicy = $wafPolicy
203204
$appgw = Set-AzApplicationGateway -ApplicationGateway $appgw
204205
Write-Host " firewallPolicy: $wafPolicyName has been created/updated successfully and applied to applicationGateway: $applicationGatewayName!"

0 commit comments

Comments
 (0)