Complete the code to create a virtual machine in Azure using the Azure CLI.
az vm create --resource-group myResourceGroup --name myVM --image UbuntuLTS --admin-username azureuser --generate-ssh-keys [1]The --location option specifies the Azure region where the VM will be created. It is required to define the location.
Complete the code to create an Azure Storage account with a unique name.
az storage account create --name [1] --resource-group myResourceGroup --location eastus --sku Standard_LRSStorage account names must be globally unique, lowercase, and only contain numbers and letters. 'mystorage123' fits these rules.
Fix the error in the Azure CLI command to list all resource groups.
az group [1]The correct command to list all resource groups is az group list. Other options are invalid or used for different purposes.
Fill both blanks to create a network security group and add a rule to allow SSH traffic.
az network nsg create --resource-group myResourceGroup --name myNSG az network nsg rule create --resource-group myResourceGroup --nsg-name myNSG --name AllowSSH --protocol [1] --priority 1000 --destination-port-ranges [2] --access Allow --direction Inbound
SSH uses TCP protocol on port 22. So the rule must allow TCP traffic on port 22.
Fill all three blanks to create an Azure App Service plan and a web app with Linux runtime.
az appservice plan create --name [1] --resource-group myResourceGroup --sku [2] --is-linux az webapp create --resource-group myResourceGroup --plan [3] --name myWebApp --runtime "PYTHON|3.8"
The App Service plan name must be consistent in both commands. 'B1' is a valid SKU for a basic plan. The web app uses the same plan name.