I'm trying to get my Build Definition to deploy all necessary resources (SQL Server, DB, Web-app and storage account) to azure, and update in case of a redeploy. I use Visual Studio Team Services VSTS / TFS. The build step "Azure Resource Group Deployment", fails with error:
"code": "StorageAccountAlreadyExists", "message": "The storage account named mystorageaccountname already exists under the subscription."
Well, it is true that the storage account mystorageaccountname already exists, but that is usual the case when trying to implement continuous delivery and redeploy. I want to reuse the existing accounts.
For other resource, like a SQL server and SQL database the pre-existence of the resource is not an issue.
How can I do a Azure Resource Group Deployment that can be used over and over again?
Check the name you have given to the storage account. It doesn't look like a valid one as it can't contain capital cases. Also, check that the existing storage you are referring to is not a 'classic' storage account (ASM) but an ARM.
More details here: https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-common-deployment-errors#storagenamenotunique
Regards, Carlos