none
Deploying storage account fails if it exists

    Question

  • I have an existing ARM template that contains a storage account. When I execute the deployment, it fails with:

    New-AzureRmResourceGroupDeployment : 11:29:54 AM - Resource Microsoft.Storage/storageAccounts 'hiscautomationqa'
    failed with message '{
      "error": {
        "code": "StorageAccountAlreadyExists",
        "message": "The storage account named hiscautomationqa already exists under the subscription."
      }
    }'

    This behavior is not expected. Has something changed?

    Friday, March 17, 2017 4:37 PM

All replies

  • Did you validate if the storage with the mentioned name is available for creation? Note that It has to be unique globally. You can simply validate it either by trying to create storage account manually using Azure portal where it will show storage name availability before creating

    or execute below PowerShell command to check it

    Test-AzureName -Storage -Name "your_storage_name"


    Bhushan |


    • Edited by Bhushan Gawale Saturday, March 18, 2017 8:03 AM uploaded image for clarification
    • Proposed as answer by Bhushan Gawale Friday, April 21, 2017 7:23 AM
    Saturday, March 18, 2017 8:01 AM
  • Hi,

    Storage account name must be unique within the azure fabric.


    If this answer help Please mark it as a answer Blog-http://allaboutwindowssl.com/

    Friday, March 24, 2017 8:28 AM