Skip to content

Improve Tags/deny-resource-without-tag: add empty-value check, excludedResourceTypes param, and description#538

Open
hendersonandrade wants to merge 1 commit into
Azure:mainfrom
hendersonandrade:improve-deny-resource-without-tag
Open

Improve Tags/deny-resource-without-tag: add empty-value check, excludedResourceTypes param, and description#538
hendersonandrade wants to merge 1 commit into
Azure:mainfrom
hendersonandrade:improve-deny-resource-without-tag

Conversation

@hendersonandrade

Copy link
Copy Markdown

Summary

Improves the existing Tags/deny-resource-without-tag policy definition. This is an in-place update (same policy name GUID 12dc4dea-6097-4a18-b24e-a9a3e00dd456), not a new policy, so existing assignments continue to work.

What changed

  • Description: replaced the placeholder "need to add description" with a meaningful description of the policy behavior.
  • Empty-value detection: the rule now triggers when the tag exists but is empty (equals ""), in addition to the previous "tag does not exist" check. Previously a resource with an empty tag value passed compliance.
  • New excludedResourceTypes parameter (Array, strongType: ResourceType, default []): allows excluding resource types that don't support tags, without editing the policy. More flexible than hardcoding exclusions.
  • Fixed allofallOf casing in the policy rule.
  • Version bumped 1.0.01.1.0 (added functionality, backward compatible — the new parameter defaults to an empty array).

Backward compatibility

  • Same policy GUID → updates the existing definition rather than creating a new one.
  • The new excludedResourceTypes parameter has a default value ([]), so existing assignments are unaffected.
  • The effect default remains Audit.

Validation

Validated with the repository's own script:

@hendersonandrade

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant