none
Error when changing tags on arm

    Question

  • If you change the tags on an arm deployment template of a storage account and try to update the storage account cannot be updated because it says that the storage account already exists and the deployment fail. 

    All you need to do to reproduce it is to create one arm template with a storage account deploy this template add more tags on the template and try to deploy again.

    Example of the error

    Microsoft.PowerShell.Commands.WriteErrorException: 4:17:20 PM - Resource Microsoft.Storage/storageAccounts 'vppstorcontit' failed with message '{

    2016-08-23T16:17:37.3469254Z ##[error]  "error": {

    2016-08-23T16:17:37.3469254Z ##[error]    "code": "StorageAccountAlreadyExists",

    2016-08-23T16:17:37.3469254Z ##[error]    "message": "The storage account named vppstorcontit already exists under the subscription."

    2016-08-23T16:17:37.3469254Z ##[error]  }

    2016-08-23T16:17:37.3469254Z ##[error]}'

    2016-08-23T16:17:37.3469254Z ##[error]Microsoft.PowerShell.Commands.WriteErrorException: 4:17:36 PM - Resource Microsoft.Resources/deployments 'v-pp-cont-it' failed with message '{

    2016-08-23T16:17:37.3469254Z ##[error]  "status": "Failed",

    2016-08-23T16:17:37.3469254Z ##[error]  "error": {

    2016-08-23T16:17:37.3469254Z ##[error]    "code": "ResourceDeploymentFailure",

    2016-08-23T16:17:37.3469254Z ##[error]    "message": "The resource operation completed with terminal provisioning state 'Failed'.",

    2016-08-23T16:17:37.3469254Z ##[error]    "details": [

    2016-08-23T16:17:37.3469254Z ##[error]      {

    Tuesday, August 23, 2016 4:37 PM

All replies

  • Can you try incremental deployment(if not already doing so) and report back if the issue persists.

    Thanks,

    Marcus


    Twitter: @techdiction Blog: http://www.techdiction.com

    Tuesday, August 23, 2016 10:15 PM
    Moderator
  • I am using incremental, and I tried also with the deploy azure resource group template raso from vsts both fail
    Wednesday, August 24, 2016 10:05 PM
  • What API version is specified in that template?  If it's 2015-06-15, I think you're running into the issue mentioned here:

    https://msdn.microsoft.com/en-us/library/azure/mt163564.aspx

    > If an account was already created and a subsequent PUT request is issued with different properties, the account properties will be updated. Prior to version 2016-01-01, existing accounts cannot be updated with this operation and should instead use the Update Storage Account operation.

    Since template deployments uses this API, it would cause re-deployments to fail with 'StorageAccountAlreadyExists' if anything changed about the account.

    Wednesday, August 24, 2016 11:45 PM