az group update

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.

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.

az group update

You may also like following the articles below.

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!