Skip to content

Instantly share code, notes, and snippets.

@kasunkv
Created January 4, 2019 13:53
Show Gist options
  • Save kasunkv/9819e319e8d21963d3308e0f75cfcf50 to your computer and use it in GitHub Desktop.
Save kasunkv/9819e319e8d21963d3308e0f75cfcf50 to your computer and use it in GitHub Desktop.
Add/Update tags using Azure CLI
result=$(az resource show --resource-group "Tags-PRD-Web" --name kvktagsprdweb --resource-type "Microsoft.Web/sites" --query tags)
tags=$(echo $result | tr -d '"{},' | sed 's/: /=/g')
az resource tag --tags $tags Owner="Kasun Kodagoda" --resource-group "Tags-PRD-Web" --name kvktagsprdweb --resource-type "Microsoft.Web/sites"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment