Forum Discussion
Phil123
Apr 19, 2022Brass Contributor
Azure Policy - Find Ressources without Tags
Hello Community, it is possible to define a Policy to find Ressources without Tags? I would like to define this Policy to list all of Items at the "Compliance" Point at the Policy Tab. I hav...
pazdedav
Apr 21, 2022Steel Contributor
Hi Phil123
I assume you are not looking for a particular tag key and/or values but you want the policy to audit all resources that have no tags.
If that is true, then you are right, there isn't any built-in policy for that!
I created a custom policy with indexed mode and used the following policy rule:
"policyRule": {
"if": {
"field": "tags",
"exists": "false"
},
"then": {
"effect": "audit"
}
}
},
Based on my tests, it did show correctly all resources in my subscription, where I haven't applied any tags. Please try it out 🙂