I’m working through some tutorials, and after successfully creating a resource group, I cannot create a corresponding storage account.
az login
Cmd to create resource group:
az group create --location "Central US" --name <my_resource_group_name>
This runs with "provisioningState": "Succeeded"
Cmd to create account storage:
az storage create --name "some_name" --resource-group <my_resource_group_name>
This fails with (SubscriptionNotFound)
Subscription <my_subscription_id> was not found.
Code: SubscriptionNotFound
Message: Subscription <my_subscription_id> was not found.
Is the tutorial missing a step in between? Azure is obviously ‘finding’ my subscription id, but I’m not sure what else is causing the error.
2
Answers
It appears somehow the correct command from the source github.com was not used. The command should be az storage account create. You seemed to have used az storage create. obviously, you missed the account part of the Azure CLI command.
Note the naming convention you cannot use special characters please check here https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview.
Storage account names must be between 3 and 24 characters in length
and may contain numbers and lowercase letters only.
Your storage account name must be unique within Azure. No two
storage accounts can have the same name.
Example: command will correctly work as below.
The above error occurs when
Microsoft.Storage
Resource Provider is not registered for the subscription.Portal:
Portal-> < Your-Subscription> -> Resource providers -> search Microsoft. Storage -> Register.