Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az resource tag failing to update replicated storage accounts #30522

Open
zoeperryman opened this issue Dec 16, 2024 · 2 comments
Open

az resource tag failing to update replicated storage accounts #30522

zoeperryman opened this issue Dec 16, 2024 · 2 comments
Assignees
Labels
ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@zoeperryman
Copy link

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

@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group labels Dec 16, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Azure CLI Team The command of the issue is owned by Azure CLI team label Dec 16, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Dec 16, 2024

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Dec 16, 2024
@zoeperryman
Copy link
Author

Workaround appears to be to call the az storage account update command instead

az storage account update -g myGroup -n myStorageaccount --tags Zoe=1

@yonzhan yonzhan added this to the Backlog milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants