Replies: 2 comments 2 replies
-
I thought I would have a crack at helping you out, but feel free to let me know if I am off track with what you are after. To find the policy/initiative IDs I would look at the: Get-AzPolicyDefinition cmdlet.
Although AdAdvertiser is a good quick resource for your built-in policies and initiatives: https://www.azadvertizer.net/azpolicyinitiativesadvertizer_all.html Azure policy samples can be found here: https://github.com/Azure/azure-policy |
Beta Was this translation helpful? Give feedback.
-
Hi @Ex3mXX You guessed right that the JSON ID library files are generated by a PowerShell script that I run myself. There's an early version in this repo which you can copy as a baseline https://github.com/globalbao/azure-policy-as-code/blob/main/x_PolicyMgmt/GetPolicyIDs.ps1 I've since modified the version above with more cmdlets to suit my needs for this repo and if you're interested you can check out this recording on YouTube where I talk about the modified version: https://www.youtube.com/watch?v=-KSLh2I9e1U Note: after the PowerShell script creates the JSON files you will need to do the following changes to ensure the JSON file is valid and can be referenced by Bicep's loadTextContent function e.g. [] -> {} I use VSCode's find + replace for quick edits on large files Happy coding! |
Beta Was this translation helpful? Give feedback.
-
Hi, just a question on how you did find the json id library files.
Did you make them yourself or is there a location where i can get them.
Missing some of them that i need for my initiatives.
Regards
Beta Was this translation helpful? Give feedback.
All reactions