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 the virtual network.
Complete the code to create a subnet within the 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 here specifies the subnet name. MySubnet is the correct choice for a subnet.
Fix the error in the command to associate a network security group with a subnet.
az network vnet subnet update --name MySubnet --resource-group MyResourceGroup --vnet-name MyVNet --network-security-group [1]The --network-security-group parameter requires the name of the network security group (NSG). MyNSG is the correct NSG name.
Fill both blanks to create a network security group and then create a rule to allow HTTP traffic.
az network nsg create --resource-group MyResourceGroup --name [1] az network nsg rule create --resource-group MyResourceGroup --nsg-name [2] --name AllowHTTP --protocol tcp --priority 1000 --destination-port-range 80 --access allow --direction inbound
Both commands use the network security group name. MyNSG is the correct name for the NSG in both places.
Fill all three blanks to create a virtual machine in a subnet with network isolation.
az vm create --resource-group [1] --name [2] --image UbuntuLTS --vnet-name MyVNet --subnet [3] --admin-username azureuser --generate-ssh-keys
The VM creation command requires the resource group name, VM name, and subnet name. Here, MyResourceGroup, MyVM, and MySubnet are correct.