Now, we need to create the IP configurations and the frontend port. The IP configurations consist of associating the subnet that was created previously with the application gateway and assigning the public IP address to the gateway as well. We are also going to assign port 80, which can be used to access the application gateway. Take the following steps:
- Create the IP configurations and the frontend port, as follows:
$vnet = Get-AzVirtualNetwork `
-ResourceGroupName PacktApplicationGateway `
-Name PacktVNet
$subnet=$vnet.Subnets[0]
$gipconfig = New-AzApplicationGatewayIPConfiguration `
-Name PacktAGIPConfig `
-Subnet $subnet
$fipconfig = New-AzApplicationGatewayFrontendIPConfig `
-Name PacktAGFrontendIPConfig `
-PublicIPAddress $pip
$frontendport = New-AzApplicationGatewayFrontendPort `
-Name PacktFrontendPort `
-Port 80
Creating the backend pool
Now, we have to create the backend pool for the application gateway and assign port 80 to it, so that...