Skip to content

fix: change policy mode of Audit-Tags-Mandatory from 'All' to 'Indexed'#2142

Open
elKei24 wants to merge 2 commits intoAzure:mainfrom
elKei24:patch-1
Open

fix: change policy mode of Audit-Tags-Mandatory from 'All' to 'Indexed'#2142
elKei24 wants to merge 2 commits intoAzure:mainfrom
elKei24:patch-1

Conversation

@elKei24
Copy link
Copy Markdown

@elKei24 elKei24 commented Mar 6, 2026

Overview/Summary

The policy Audit-Tags-Mandatory so far uses the mode All and therefore even applies to resources that do not support tags, and, unlike specified in the policy description, even to resource groups.

Changing the policy mode to Indexed is suggested in the documentation:

indexed should be used when creating policies that enforce tags or locations. While not required, it prevents resources that don't support tags and locations from showing up as non-compliant in the compliance results. The exception is resource groups and subscriptions. Policy definitions that enforce location or tags on a resource group or subscription should set mode to all and specifically target the Microsoft.Resources/subscriptions/resourceGroups or Microsoft.Resources/subscriptions type.

For resource groups, there already is the "sibling policy" Audit-Tags-Mandatory-Rg.

This PR fixes

  1. Fixes the root problem of Audit for mandatory tags on resources should have excludeResourceTypes & excludeResourcegroupPattern Azure-Landing-Zones#207

Testing Evidence

Screenshots

Before

Honestly I don't understand why some role assignments were marked Compliant in the first place.

Screenshot 2026-03-06 at 10 44 20 Screenshot 2026-03-06 at 09 58 10

After

Screenshot 2026-03-06 at 13 38 51 Screenshot 2026-03-06 at 13 35 22

Testing URLs

Azure Public

Deploy To Azure

Azure US Gov (Fairfax)

Deploy To Azure

As part of this Pull Request I have

  • Checked for duplicate Pull Requests
  • Associated it with relevant issues, for tracking and closure.
  • Ensured my code/branch is up-to-date with the latest changes in the main branch
  • Performed testing and provided evidence.
  • Ensured contribution guidance is followed.
  • Updated relevant and associated documentation.
  • Updated the "What's New?" wiki page (located: /docs/wiki/whats-new.md)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Triage 🔍 Needs triaging by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants