az storage container create fails and returns incorrect error message
See original GitHub issueDescribe the bug
az storage container create
fails after creating a storage account.
Command Name
az storage container create
Errors:
The request may be blocked by network rules of storage account. Please check network rule set using 'az storage account show -n accountname --query networkRuleSet'.
If you want to change the default action to apply when no rule matches, please use 'az storage account update'.
If I run the command suggested in the error message, az storage account show -n accountname --query networkRuleSet
, I get the output below, showing that there are no network rules blocking the creation of a storage container:
{
"bypass": "AzureServices",
"defaultAction": "Allow",
"ipRules": [],
"virtualNetworkRules": []
}
To Reproduce:
The BASH script below reproduces the issue:
#!/bin/bash
location="eastus"
resourceGroupName="rg-repro"
storageAccountName="sarepro"
storageContainerName="ctrepro"
az group create --location $location --name $resourceGroupName
az storage account create \
--name $storageAccountName \
--resource-group $resourceGroupName \
--location $location
az storage container create \
--name $storageContainerName \
--account-name $storageAccountName \
--resource-group $resourceGroupName \
--auth-mode login
Expected Behavior
The az storage container create
command should succeed, or there should be an error message describing why the command failed.
Environment Summary
Linux-4.19.104-microsoft-standard-x86_64-with-debian-bullseye-sid
Python 3.6.10
Installer: DEB
azure-cli 2.10.1
Additional Context
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Resolve errors for storage account names - Azure
Describes how to resolve errors for Azure storage account names ... An invalid storage account name causes an error code during deployment.
Read more >Azure CLI cannot find blob in storage container when using CLI
You'll notice the error I got was, "Authentication failure. This may be caused by either invalid account key, connection string or sas token ......
Read more >Error from az storage blob upload-batch command in Azure ...
When trying to run this command from an Azure Devops release task. The task is a Azure CLI (Preview) V2 with Powershell core...
Read more >Troubleshooting mount issues - Amazon Elastic File System
A file system mount on an Amazon EC2 instance on Microsoft Windows fails. ... with "incorrect mount option" error message; Mounting with access...
Read more >You are not authorized to perform this operation - ShareGate
Your Azure storage container is expired. This can occur with containers provided by Microsoft. The migration tool uses these containers by ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
az storage container-rm
is supported now without additional data related roles. It will use login AD credential directly to ARM.It is because they are using your management login information with some control plane API but CLI is using data plane API for container operations. We are working on support same behavior with portal for container operations now.