Cannot create Azure Resource Group

Dennis Stevens 0 Reputation points
2024-01-01T16:25:38.6233333+00:00

In the Microsoft training, I run the command:

resourceGroup=$(az group list --query "[].{id:name}" -o tsv) appName=az204app$RANDOM

and I get an error message:

azureuser [ ~/htmlapp/html-docs-hello-world ]$ ^[[200~resourceGroup=$(az group list --query "[].{id:name}" -o tsv)

ERROR: Please run 'az login' to setup account.

bash: $'\E[200~resourceGroup=': command not found

https://learn.microsoft.com/en-us/training/modules/introduction-to-azure-app-service/7-create-html-web-app

Azure Azure Training
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. TP 124.7K Reputation points Volunteer Moderator
    2024-01-01T17:11:08.4466667+00:00

    Hi Dennis,

    From your description it appears you are attempting to run the commands inside of a VM instead of the Cloud Shell, since you have "azureuser" at the beginning of the line. Perhaps you used SSH to connect to a VM from within the Cloud Shell? You can type "exit" and press enter to get out of an SSH session.

    The user name that appears at the beginning of the line in the Cloud Shell window should be similar to the one you used to sign in to the sandbox. For example, say you used Microsoft Account ******@gmail.com to sign in to Learn, you should see dstevensXYZ9758123 [ ~ ]$

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.