LinuxCommandLibrary

az-group

Manage Azure resource groups

TLDR

Create a new resource group

$ az group create [[-n|--name]] [name] [[-l|--location]] [location]
copy

Check if a resource group exists
$ az group exists [[-n|--name]] [name]
copy

Delete a resource group
$ az group delete [[-n|--name]] [name]
copy

Wait until a condition of the resource group is met
$ az group wait [[-n|--name]] [name] --[created|deleted|exists|updated]
copy

SYNOPSIS

az group <command> [--debug] [--help] [--output format] [--query JMESPath] [--subscription id] [--verbose]

PARAMETERS

--debug
    Increase logging verbosity to show all debug logs

--help -h
    Show this help message and exit

--only-show-errors
    Get error result only; suppress successful operation messages

--output -o
    Output format: json|jsonc|table|tsv|yaml[.compact] (default: json)

--query
    JMESPath query string for output filtering (see http://jmespath.org/)

--subscription
    Name or ID of subscription (config via az account set)

--verbose
    Increase logging verbosity (use --debug for full logs)

DESCRIPTION

az group is a core command in the Azure Command-Line Interface (Azure CLI), Microsoft's cross-platform toolset for managing Azure resources from terminals or scripts. It specializes in handling resource groups, logical containers that organize and manage Azure resources like VMs, storage, and databases as a unit.

Resource groups enable collective lifecycle management: deploy, update, monitor, or delete all contained resources together. This supports infrastructure-as-code workflows, automation, and cost tracking via tags and locations.

Usage requires Azure CLI installation, login via az login, and a valid subscription. It's ideal for DevOps pipelines, scripting deployments, and querying group states with JMESPath.

Subcommands cover full CRUD operations plus exports and waits, making it indispensable for Azure administrators and developers.

CAVEATS

Requires Azure CLI >=2.0, az login, and active subscription. Deleting a group removes all resources irreversibly; use --no-wait cautiously.

SUBCOMMANDS

create, delete, export, list, show, update, wait

EXAMPLES

az group create --name myRG --location eastus
az group list --output table
az group delete --name myRG --yes --no-wait

HISTORY

Introduced in Azure CLI 2.0 (2017) as part of transition from xplat-cli; evolved with ARM templates, tags, and multi-subscription support in later releases.

SEE ALSO

az(1), az account(1)

Copied to clipboard