Complete the code to create a virtual network in Azure.
az network vnet create --name [1] --resource-group MyResourceGroup --location eastus --address-prefix 10.0.0.0/16
The --name parameter specifies the name of the virtual network. Here, MyVNet is the correct name for a virtual network.
Complete the code to add a subnet to an existing virtual network.
az network vnet subnet create --address-prefix 10.0.1.0/24 --name [1] --vnet-name MyVNet --resource-group MyResourceGroup
The --name parameter specifies the subnet name. MySubnet is the correct choice for a subnet.
Fix the error in the command to create a network security group.
az network nsg create --resource-group MyResourceGroup --name [1] --location eastusThe --name parameter should be the name of the network security group. MyNSG is the correct name for a network security group.
Fill both blanks to create a rule allowing HTTP traffic in a network security group.
az network nsg rule create --resource-group MyResourceGroup --nsg-name MyNSG --name AllowHTTP --protocol [1] --direction [2] --priority 100 --source-address-prefix '*' --source-port-range '*' --destination-address-prefix '*' --destination-port-range 80 --access Allow
The --protocol should be Tcp for HTTP traffic. The --direction should be Inbound to allow incoming traffic.
Fill all three blanks to create a public IP address and associate it with a network interface.
az network public-ip create --resource-group MyResourceGroup --name [1] --allocation-method [2] --sku Basic az network nic ip-config update --resource-group MyResourceGroup --nic-name MyNic --name ipconfig1 --public-ip-address [3]
The public IP address is named MyPublicIP. The allocation method is Dynamic to assign IP automatically. The network interface associates with the same public IP name MyPublicIP.