Azure/ALZ-Bicep

ALZ Default Policy Assignments Module resulting in file exceeded 4 MB size

Anto4595 opened this issue · 5 comments

Describe the feature end to end, including deployment scenario details under which the feature would occur.

Hello @jtracey93 @oZakari

As you suggested we need to break the script into chunks. I am not sure how to break it and deploy it.

Can you explain in detail how I can do that ?

Thank You...

Why is this feature important. Describe why this would be important for your organization and others. Would this impact similar orgs in the same way?

NA

Please provide the correlation id associated with your error or bug.

NA

Can you describe any alternatives that you have taken since this feature does not exist?

NA

Feature Implementation

NA

Check previous GitHub issues

  • I have searched the issues for this item and found no duplicate

Code of Conduct

  • I agree to follow this project's Code of Conduct

Hi @Anto4595, with the release of v0.19.1, which I just published, you should no longer encounter the issue unless you're heavily customizing the module by adding additional policy assignments.

If you still need to break it up, the simplest approach is to divide the existing module into separate deployments based on the management group hierarchy. To do this, duplicate the alzDefaultPolicyAssignments.bicep file and the alzDefaultPolicyAssignments.parameters.all.json, rename each copy according to the hierarchies you want to target for the assignments, and then update references (variables, parameters, module references, etc.) so that each file only deploys to the necessary hierarchies.

For example, I created this image to show you how it could be done. The main objective is to reduce the size of the Bicep file, so feel free to break it up as needed.

image

Hopefully this helps, but if you need additional clarification feel free to respond back.

Hello @oZakari Still facing the same issue on the size issue with same error . Eventhough if you have published a new version can you check and advise..

I am also experiencing this issue. In my deployment I have an additional Management Group being deployed alongside Corp and Online (parLandingZoneMgChildren) - not sure if that could be the cause.

I was able to deploy the same configuration in my lab environment last week without issue

Hey, @Anto4595 and @andrewj-t, re-opened issue as I am not getting it as well. Will check to see what may have happened on the Azure side as it was working fine for me as well last week with condensed parameter descriptions.

The PR that I linked today and release v0.19.2 should work again.