Reputation: 23
I wonder if there is a simple query, perhaps that I could run in the Azure Resource Graph Explorer, that shows missing tags for resources and resource groups in an azure subscription.
I notice that on some of my resources and resource groups, the tags=Temporary. Does this mean they get automatically assigned Temporary due to the policy forcing a tag entry, where no specific tag is set?
Thanks
I tried running some template Azure Resource Graph explorer scripts, but none gave me what I wanted.
Upvotes: 0
Views: 1001
Reputation: 10302
How to display missing tags for resources and resource groups in Azure subscription.
You can use the below query to display the missing tags for resource and resource groups in the Azure subscription.
Query:
Resources
| where subscriptionId == 'xxxx'
| where isnull(tags)
| project name, location, resourceGroup,type
Output:
I notice that on some of my resources and resource groups, the tags=Temporary. Does this mean they get automatically assigned Temporary due to the policy forcing a tag entry, where no specific tag is set?
In relation to the tags=Temporary
you're seeing, it's possible that certain resources or resource groups have this value assigned as a result of a policy or procedure that automatically assigns default values when no defined tags are provided.
However, the exact behaviour can depend on your organization's policies and configurations.
Reference:
Policy definitions for tagging resources - Azure Resource Manager | Microsoft Learn
Upvotes: 0