Storage account creation failure using bicep template

Varma 1,385 Reputation points
2024-03-30T10:22:06.59+00:00

I am seeing following error: Please suggest

User's image

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,336 questions
{count} votes

Accepted answer
  1. Marcin Policht 32,425 Reputation points MVP
    2024-03-30T11:11:46.8833333+00:00

    You need to specify a different name for your storage account. This name must be globally unique - the one you provided is already in us


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 20,467 Reputation points Microsoft Employee
    2024-03-30T22:22:36.1033333+00:00

    @Varma As documented here, your storage account name must be unique within Azure. No two storage accounts can have the same name.

    Explained further in this thread, Storage account must be unique across all subscriptions globally, not just yours. The reason for that is that the name becomes part of the URL, e.g., https://accountname.blob.core.windows.net. Since the URL needs to be resolved to a single account, there is no way to have two accounts with the same name.

    You can check the name availability using the REST API as explained here.

    POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability?api-version=2023-01-01

    0 comments No comments

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.