Reputation: 672
I am following the CLI from the official azure doc.
Specifically, I am looking for a way to add a tag to a storage account in Azure through CLI. It looks like az storage account update
allows me to do that.
But how do I specify the name of the storage group? Can anyone provide me with an example?
Upvotes: 1
Views: 843
Reputation: 7928
Why don't you try this:
az resource update --set tags.'<tagName>'='<tagValue>' -g <your_rg> -n <your_sa> --resource-type "Microsoft.Storage/storageAccounts"
As seen here: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources
Or this:
az storage account update --name <your_sa> --resource- group <your_rg> --tags “<tagkey>= <tagvalue>”
Upvotes: 1
Reputation: 672
After some trial and error, I have found that below line worked for me:
az storage account update --name storage_account_name --tags 'tag_name=tag_value'
Upvotes: 2