Skip to content

Commit 9316957

Browse files
author
Igor Pagliai
authored
Update migrate-policy.md
There is a mistake in the script, just fixed one line.
1 parent 4f8fddf commit 9316957

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ function createNewTopLevelWafPolicy ($subscriptionId, $resourceGroupName, $appli
182182
183183
if ($appgw.FirewallPolicy) {
184184
$customRulePolicyId = $appgw.FirewallPolicy.Id
185-
$rg = Get-AzResourceGroup -Id $customRulePolicyId
185+
$rg = Get-AzResourceGroup -Name $resourceGroupName
186186
$crPolicyName = $customRulePolicyId.Substring($customRulePolicyId.LastIndexOf("/") + 1)
187187
$customRulePolicy = Get-AzApplicationGatewayFirewallPolicy -ResourceGroupName $rg.ResourceGroupName -Name $crPolicyName
188188
$wafPolicy = New-AzApplicationGatewayFirewallPolicy -ResourceGroupName $rg.ResourceGroupName -Name $wafPolicyName -CustomRule $customRulePolicy.CustomRules -ManagedRule $managedRule -PolicySetting $policySetting -Location $appgw.Location

0 commit comments

Comments
 (0)