ARM Template to create a container in an existing storage account

Kothai Ramanathan 941 Reputation points Microsoft Employee
2021-02-10T12:21:55.55+00:00

I have an existing storage account. I want the ARM template to create only a container in an existing storage account. I see this piece to create a container :

  "resources": [
    {   
  "type": "blobServices/containers",
  "apiVersion": "2018-03-01-preview",
  "name": "[concat(parameters('ApplicationName'))]"
} ]

However, how do I provide details of the storage account in which to create this container ?
Should this piece be within the resources of the storage account ? I do not want to specify the ARM template of the storage account, as this is already existing.
Can I not create the container independently of the storage account. Please let me know, thanks!

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.
2,944 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sam Cogan 10,347 Reputation points MVP
    2021-02-10T14:09:57.01+00:00

    You can't create a container as a separate object, it needs to be in the resources section of the storage account. If your looking to apply this to an existing storage account then you would need to create a storage account object matching up with the existing account and adding the container to the resources section.


0 additional answers

Sort by: Most helpful