Creating network resources

Next, we need to create a resource group and the required network resources. We need to create two subnets – one for the application gateway and one for the backend pool – which we will create later in this demo. Take the following steps:

  1. Create a resource group, as follows:
New-AzResourceGroup -Name PacktApplicationGateway -Location EastUS
  1. Create the network resources, as follows:
$PacktAGSubnet = New-AzVirtualNetworkSubnetConfig `
-Name PacktAGSubnet `
-AddressPrefix 10.0.1.0/24
  1. Create the subnets, as follows:
$PacktBackendSubnetConfig = New-AzVirtualNetworkSubnetConfig `
-Name PacktBackendSubnetConfig `
-AddressPrefix 10.0.2.0/24
  1. Create the VNet, as follows:
$vnet = New-AzVirtualNetwork `
-ResourceGroupName PacktApplicationGateway `
-Location eastus `
-Name PacktVNet `
-AddressPrefix 10.0.0.0/16 `
-Subnet $PacktAGSubnet, $PacktBackendSubnetConfig
  1. Create the public IP address, as follows:
$pip = New-AzPublicIpAddress `
-ResourceGroupName PacktApplicationGateway `
-Location eastus `
-Name PacktAGPublicIPAddress `
-AllocationMethod Dynamic
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset