0
   While creating webapps using Az cli in Azure, the command line have no option to mention the location parameter. However while creating from azure portal,there is a option where in we can select the region .

Following is the link to the command and the command itsel https://learn.microsoft.com/en-us/cli/azure/webapp?view=azure-cli-latest

az webapp create --name
                 --plan
                 --resource-group
                 [--assign-identity]
                 [--deployment-container-image-name]
                 [--deployment-local-git]
                 [--deployment-source-branch]
                 [--deployment-source-url]
                 [--docker-registry-server-password]
                 [--docker-registry-server-user]
                 [--https-only {false, true}]
                 [--multicontainer-config-file]
                 [--multicontainer-config-type {COMPOSE, KUBE}]
                 [--role]
                 [--runtime]
                 [--scope]
                 [--startup-file]
                 [--subnet]
                 [--tags]
                 [--vnet]

               
2
  • What is happening if you create the webapp with Azure CLI without the missing location? Commented May 26, 2022 at 5:46
  • @user19203752 - we don't have any parameter to specify location while creating the web app using the Azure CLI cmdlet Az webapp create. Try using New-Azwebapp PowerShell cmdlet if you want to specify the location while creating the webapp. Commented May 26, 2022 at 5:56

1 Answer 1

2

You can use az webapp up CLI command which has a location switch like

az webapp up -n MyUniqueAppName --runtime "java:11:Java SE:11" -l locationName

BTW, if you even don't specify the location while using az webapp create it will be default to the region of "Resource Group" or if you are specifying app service plan then that region would be in use

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.