Azure Policy support (Experimental) #1345
BernieWhite
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Updated 2023-08-08
We've started work on a new feature, Azure Policy support for PSRule for Azure - policy as rules.
Azure Policy support will allow you to use your existing Azure Policies to generate custom rules you can use to test your infrastructure as code before deployment to Azure.
This feature is still early in it's lifecycle and we have still a lot more to do. However we wanted to share an early version and where we are up to:
Some key points:
How to get started
Export assignment data
Run
Export-AzPolicyAssignmentDatato export assignments from Azure to an*.assignment.jsonfile.Key points:
AzPowerShell module and usingConnect-AzAccount.Set-AzContext.Convert assignments to rules
Run
Export-AzPolicyAssignmentRuleDatato convert assignments to rules. To run this command an-AssignmentFileparameter with the path to the assignment JSON file generated in the previous step.After the command completes a new file
*.Rule.jsoncshould be generated containing generated rules.If you try this feature we'd love to hear your feedback and issues.
Beta Was this translation helpful? Give feedback.
All reactions