here is the ARM template to create storage account
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_ZRS",
"Standard_GRS",
"Standard_RAGRS",
"Premium_LRS"
],
"metadata": {
"description": "Describes the storage type."
}
}
},
"resources": [
................
{
"apiVersion": "2015-06-15",
"name": "[variables('storageName')]",
"type": "Microsoft.Storage/storageAccounts",
"location": "[resourceGroup().location]",
"dependsOn": [ ],
"tags": {
"displayName": "storage"
},
"properties": {
"accountType": "[parameters('storageAccountType')]"
}
}
]
}
works perfectly fine, however when I'm trying to use account type Standard_RAGRS to have geo replication it returns an error:
'The storage account named ..... already exists under the subscription.'
What am I doing wrong?
Thanks
There is no issue in your ARM template on the Storage Account resource.
I am able to use this template to provision storage accounts with different account types successfully.
The root cause based on your error message is because you already have an existing storage account name under the same resource group and same subscription
with the one you're trying to create.
I am able to reproduce your error exactly with the same scenario above.
message":"The storage account named 'abcstorageacct' already exists under the subscription."}}