Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Creates the AG itself.
# step 11 - change App Gateway SKU and instances (# instances can be configured as required)
$sku = New-AzApplicationGatewaySku -Name "WAF_Medium" -Tier "WAF" -Capacity 1
# step 12 - configure WAF to be in prevention mode
$config = New-AzApplicationGatewayWebApplicationFirewallConfiguration `
-Enabled $true `
-FirewallMode "Detection"
# Deploy the App Gateway
$appgwName = "aumanager-apim-app-gw"
$appgw = New-AzApplicationGateway `
-Name $appgwName `
-ResourceGroupName $resGroupName `
-Location $location `
-BackendAddressPools $apimProxyBackendPool, $sinkpool `
-BackendHttpSettingsCollection $apimPoolSetting, $apimPoolPortalSetting `
-FrontendIpConfigurations $fipconfig01 `
-GatewayIpConfigurations $gipconfig `
-FrontendPorts $fp01 `
-HttpListeners $listener, $portalListener `
-RequestRoutingRules $rule01 `
-Sku $sku `
-WebApplicationFirewallConfig $config `
-SslCertificates $cert, $certPortal `
-AuthenticationCertificates $authcert `
-Probes $apimprobe, $apimPortalProbe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment