feat: add policy exemption to overwrites #696
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview/Summary
Replace this with a brief description of what this Pull Request fixes, changes, etc.
This PR fixes/adds/changes/removes
Add policy exemptions to the CAF using the
archetype_config_overrides
as discussed in #277 . It is possible to exempt a scope (either subscription, resource group or individual resources) from a policy/initiative or from one policy within an initiative. The exemption must be defined at the scope the policy is assigned.For every entry in the configuration above, one exemption is created.
There are several limitations to discuss:
archetype_config_overrides
is confusing, as thepolicy_exemption
parameter actually works for both policies and initiatives (it makes a complete exemption), while theinitiative_exemption
parameter gives the possibility to select policies within the initiative to exempt from.Breaking Changes
No breaking changes, as this is an optional configuration.
Testing Evidence
The exemptions are visible in the portal as expected.
As part of this Pull Request I have
main
branch