Skip to content

Commit e577e8c

Browse files
Merge pull request #278291 from igorpag/patch-13
Update migrate-policy.md
2 parents 3fa4c96 + 9316957 commit e577e8c

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)