Azure / Enterprise-Scale

The Azure Landing Zones (Enterprise-Scale) architecture provides prescriptive guidance coupled with Azure best practices, and it follows design principles across the critical design areas for organizations to define their Azure architecture
https://aka.ms/alz
MIT License
1.65k stars 932 forks source link

Add policy set definition workaround #1659

Closed jaredfholgate closed 3 weeks ago

jaredfholgate commented 3 weeks ago

Overview/Summary

This fixes an issue where policy set definitions only reference one policy definition.

I tried various workarounds in the class definitions before resorting this option. It appears there is a fundamental issue in PowerShell that results in needing to fix it like this rather than in the class constructor / definition as you would expect.

This PR fixes/adds/changes/removes

N/A

Breaking Changes

N/A

Testing Evidence

This is a fix to a script library used for policy sync, so does not need portal testing.

You can see a working run based on this branch over here: https://github.com/Azure/terraform-azurerm-caf-enterprise-scale/pull/972/files

As part of this Pull Request I have