Skip to content

az resource tag failing to update replicated storage accounts #30522

@zoeperryman

Description

@zoeperryman

Describe the bug

When trying to add tags to a storage account I get an error when the storage account is replicated to another region.

Command Name
az resource tag

Errors:

Code: AccountPropertyCannotBeUpdated
Message: The property 'secondaryLocation' was specified in the input, but it cannot be updated as it is read-only. For more information, see - https://aka.ms/storageaccountupdate

To Reproduce:

Steps to reproduce the behavior.

  • Create a replicated storage account, in my case it is a Geo-redundant storage (GRS)
  • az resource tag -g myGroup -n myStorageaccount --resource-type "Microsoft.Storage/storageAccounts" --tags Zoe=1

Expected Behavior

I expect the tags to be added to the storage account. I have no ability to provide (or omit) the secondaryLocation on the az resource tag command.

This works perfectly fine for most storage accounts, but fails on the one that is setup for replication.

Environment Summary

Windows-11-10.0.22631-SP0
Python 3.12.7
Installer: MSI

azure-cli 2.67.0

Extensions:
datafactory 1.0.2
datamigration 1.0.0b2
maintenance 1.6.0
monitor-control-service 1.2.0
scheduled-query 1.0.0b1

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Additional Context

Similar to an issue I have with tagging managed instances: #30095

Metadata

Metadata

Assignees

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamOKR CandidateThis label is used to track how many GitHub issues we have resolved for OKR purpose.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions