Skip to content

Instantly share code, notes, and snippets.

@fabriciosanchez
Created April 10, 2020 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabriciosanchez/a2a58d3d4ca3fee62628f4f34a4e911e to your computer and use it in GitHub Desktop.
Save fabriciosanchez/a2a58d3d4ca3fee62628f4f34a4e911e to your computer and use it in GitHub Desktop.
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