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
This pull request introduces several significant changes to the PowerShell scripts and GitHub workflows to improve policy management and testing. The key changes include the addition of new functions for JSON handling in PowerShell, new unit tests for policy builds, a new workflow for checking policy builds, and the removal of an outdated workflow.
New Functions for JSON Handling:
Added Remove-JSONMetadata function to remove metadata from JSON objects and handle nested templates. (.github/actions-pester/PolicyPesterTestHelper.psm1)
Added ConvertTo-OrderedHashtable function to convert JSON strings to ordered hashtables, ensuring consistent key order. (.github/actions-pester/PolicyPesterTestHelper.psm1)
New Unit Tests:
Introduced UnitTest-BuildPolicies to validate that policy, initiative, and role definition builds match the expected output. (.github/actions-pester/Test-BuildPolicies.Tests.ps1)
New Workflow for Policy Build Checks:
Added check-policy-build.yml workflow to automatically check policy builds on pull requests. (.github/workflows/check-policy-build.yml)
Removed Outdated Workflow:
Removed the update-portal.yml workflow, which was responsible for updating the portal experience on pull requests. (.github/workflows/update-portal.yml)
This pull request introduces several significant changes to the PowerShell scripts and GitHub workflows to improve policy management and testing. The key changes include the addition of new functions for JSON handling in PowerShell, new unit tests for policy builds, a new workflow for checking policy builds, and the removal of an outdated workflow.
New Functions for JSON Handling:
Remove-JSONMetadata
function to remove metadata from JSON objects and handle nested templates. (.github/actions-pester/PolicyPesterTestHelper.psm1
)ConvertTo-OrderedHashtable
function to convert JSON strings to ordered hashtables, ensuring consistent key order. (.github/actions-pester/PolicyPesterTestHelper.psm1
)New Unit Tests:
UnitTest-BuildPolicies
to validate that policy, initiative, and role definition builds match the expected output. (.github/actions-pester/Test-BuildPolicies.Tests.ps1
)New Workflow for Policy Build Checks:
check-policy-build.yml
workflow to automatically check policy builds on pull requests. (.github/workflows/check-policy-build.yml
)Removed Outdated Workflow:
update-portal.yml
workflow, which was responsible for updating the portal experience on pull requests. (.github/workflows/update-portal.yml
)