1

I'am looking for a way to audit tags on subscription level using azure policy. For example: check if every subscription has the tag environment applied.

The built-in definitions only target resourcegroups, i'm wondering if it is possible to do the same for subscriptions.

Duncan
  • 23
  • 3

1 Answers1

0

Yes, of course. It's not required to select the resource group:

Select Scope

Markus Meyer
  • 3,327
  • 10
  • 22
  • 35
  • Hi markus, that's nog what i'm looking for. I want to audit the tag's that are set on the subscription itself. " For example: check if every subscription has the tag environment applied." – Duncan Sep 28 '20 at 06:47
  • I know you can, but i want to audit that. i'm working with more than 50 subscriptions and need to audit wheter tags have been set – Duncan Sep 28 '20 at 07:13
  • Got it. My subscription is marked as non-compliant "policyRule": { "if": { "allOf": [ { "field": "type", "equals": "Microsoft.Resources/subscriptions" }, { "field": "[concat('tags[', parameters('tagName'), ']')]", "exists": "false" } ] }, – Markus Meyer Sep 28 '20 at 08:39