Creating an Azure Web App with Azure CLI

Now, let's repeat the same process using the Azure CLI. You can see that the Azure CLI script structure is very similar to Azure PowerShell:

$webappname='packt-demo-cli-webapp-01'$ResourceGroupName ='packt-demo-cli'az group create --location westeurope --name $ResourceGroupNameaz appservice plan create --name $webappname --resource-group $ResourceGroupName --sku Freeaz webapp create --name $webappname --resource-group $ResourceGroupName --plan $webappname

After executing the script, you should receive a long output that ends like this:

If we go to Azure Portal, we should find the new resource group ...

Get Hands-On Cloud Administration in Azure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.