When you have hundreds of resources across multiple resource groups it can be hard to find what you’re looking for. Tags to the rescue!
Find all resources with a specific tag name and value:
az resource list --tag environment=production --query "[].{Name:name, Type:type, RG:resourceGroup}" -o tableIf you only care about the tag key (regardless of value):
az resource list --tag environment --query "[].{Name:name, Type:type, RG:resourceGroup}" -o tableWant to find resources that are missing a specific tag? Use Azure Resource Graph:
az graph query -q "Resources | where tags !has 'environment' | project name, type, resourceGroup" -o tableNote: The az graph command requires the resource-graph extension. Install it with az extension add --name resource-graph.