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.
ARM Template to create a container in an existing storage account
Kothai Ramanathan
941
Reputation points Microsoft Employee
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!