Azure / manage-azure-policy

GiHub Action to manage Azure policy from GitHub workflows
MIT License
56 stars 25 forks source link

Feature Request - Policy Excemption #87

Closed ThomasStubergh closed 2 years ago

ThomasStubergh commented 2 years ago

Do you have plans to add policy excemption to this very cool github action to deploy policies? We are using it at the moment, but lack the feature to excempt resources from policies when needed.

github-actions[bot] commented 2 years ago

This issue is idle because it has been open for 14 days with no activity.

ThomasStubergh commented 2 years ago

Any update on this? It would be a nice feature to also have as a part of this deploy instead of either filtering or handling it in the portal (which we don't want to).

github-actions[bot] commented 2 years ago

This issue is idle because it has been open for 14 days with no activity.

ThomasStubergh commented 2 years ago

I found a way to add exemptions by creating extra policies which do a DeployIfNotExist on the resources which should have an exemption. This means you need one policy which monitors resources, and another policy which gives you the option to remediate the resource so that it is configured with an exemption. Another way to solve it would be to use bicep/terraform or ARM templates where you also add an exemption resource as part of the deployment, but then you need to know the policy assignment ID and policyreference ID as part of the deployment.