I have created a storage account with endpoint type AzureDnsZone
. Used below command to create one.
az storage account create --resource-group "rg-ci" --name "deletethisstaazdns001" --location "westeurope" --dns-endpoint-type AzureDNSZone --sku Standard_LRS --kind StorageV2
AFter that i am trying to create a container in that storage account using below command.
az storage container create --account-name "deletethisstaazdns001" --name "test" --public-access Container
But i am getting this error.
<urllib3.connection.HTTPSConnection object at 0x0000020B3F5E9C50>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed
The storage endpoints are different becuase it's using AzureDnsZone type. But the az storage container create
command seem to be using Standard
blob endpoint.
Unable to create container in a Storage account created with endpoint type as AzureDnsZone
You can able to create container in a Storage account created with endpoint type as AzureDnsZone using below command.
Command:
az storage container create --account-name "venkatsample" --name "test" --public-access Container --blob-endpoint "https://venkatsample.z26.blob.storage.azure.net/"
Command and output:
venkatesan [ ~ ]$ az storage container create --account-name "venkatxxxxe" --name "test" --public-access Container --blob-endpoint "https://venkatsxxxxle.z26.blob.storage.azure.net/"
{
"created": true
}
You need specify --blob-endpoint
in the command to create container in the AzureDnsZone
type storage account.
You can get the blob endpoint from portal or azure storage account show command.
Portal:
Reference: az storage account | Microsoft Learn