Skip to main content

Azure CLI Resource Groups & Tags Cheat Sheet 2026

Azure CLI — Resource Groups & Tags Cheat Sheet 2026

Azure CLI Resource Groups & Tags Cheat Sheet is the complete quick-reference of Azure CLI Resource Groups & Tags commands grouped by function. Copy any command with one click and find what you need with Ctrl+F in under 3 seconds.

Resource Groups & Tags

Action Command Useful flags
Create a new resource group
az group create --name <name> --location <location>
--name --location
Check if a resource group exists
az group exists --name <name>
--name
Delete a resource group
az group delete --name <name>
--name
Wait until a condition of the resource group is met
az group wait --name <name> --<created|deleted|exists|updated>
--name
Create a tag value
az tag add-value --name <tag_name> --value <tag_value>
--name --value
Create a tag in the subscription
az tag create --name <tag_name>
--name
Delete a tag from the subscription
az tag delete --name <tag_name>
--name
List all tags on a subscription
az tag list --resource-id /subscriptions/<subscription_id>
--resource-id
Delete a tag value for a specific tag name
az tag remove-value --name <tag_name> --value <tag_value>
--name --value
Create a read-only subscription level lock
az lock create --name <lock_name> --lock-type ReadOnly
--name --lock-type
Create a read-only resource group level lock
az lock create --name <lock_name> --resource-group <group_name> --lock-type ReadOnly
--name --resource-group --lock-type
Delete a subscription level lock
az lock delete --name <lock_name>
--name

⚠️ Dangerous / Destructive Commands

These commands are irreversible. Verify your environment (dev/staging vs prod) before running them.

Action Command Warning
⚠️ Delete
az group delete --name <name>
Irreversible — verify the target before running
⚠️ Tag
az tag delete --name <tag_name>
Irreversible — verify the target before running
⚠️ Delete
az lock delete --name <lock_name>
Irreversible — verify the target before running

FAQ — Frequently Asked Questions

What is the difference between Resource Groups & Tags and the other groups?

Each group in this Azure CLI cheat sheet covers a distinct area. Resource Groups & Tags focuses on its specific scope, while the other groups and the remaining groups cover networking, storage, security and diagnostics respectively.

How do I check the installed Azure CLI version?

Run the version command (usually az version or az --version). The output shows the client and, when applicable, the server version.

Why does Azure CLI return ‘permission denied’?

A ‘permission denied’ error in Azure CLI usually means the current user lacks sufficient privileges or credentials are not configured. Check: (1) assigned IAM/RBAC roles, (2) an active authentication context via the corresponding login command.

How do I filter Azure CLI output by status or name?

Use flags such as --filter, --selector or --query depending on the tool. You can also pipe into grep or jq to process JSON:

az list | grep RUNNING

What is the fastest way to debug a Azure CLI error?

Add the verbose flag (--verbose, -v or --debug) to the failing command. This reveals the underlying HTTP/API calls and the full error response body.

Official sources & references

Commands cross-checked against vendor documentation and high-authority repositories: