Recently, I got the requirement to use the az group update command. In this article, I will walk you through the syntax and usage of the az group update Azure CLI command with examples.
Table of Contents
az group update
This az group update command can help you to update a resource group.
Syntax
az group update --name
[--set]
[--tags]Example
The below Azure CLI script will update the resource group named MyNewResGrp with the specified tag values.
az group update --resource-group MyNewResGrp --set tags.CostCenter='{"Dept":"HR","Environment":"Dev"}'After executing the above command, I got the below-expected output, and the tag value was updated successfully.
PS /home/bijay> az group update --resource-group MyNewResGrp --set tags.CostCenter='{"Dept":"HR","Environment":"Dev"}'
{
"id": "/subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/MyNewResGrp",
"location": "eastus",
"managedBy": null,
"name": "MyNewResGrp",
"properties": {
"provisioningState": "Succeeded"
},
"tags": {
"CostCenter": "{'Dept': 'HR', 'Environment': 'Dev'}"
},
"type": "Microsoft.Resources/resourceGroups"
}You can see the same successful output in the screenshot shown below.

You may also like following the articles below.

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
