Skip to content

Commit 6f245aa

Browse files
6.7.0
6.7.0 alz pa checker - New feature "ALZ Policy Assignments Checker" - This new view, will compare the current deployed ALZ hierarchy with the ALZ archetypes definitions and point out the missing policy assignments. It will also reference the missing policy assignments' payloads and [AzAdvertizer](https://www.azadvertizer.net/) links. - New switch-parameter `-ALZPolicyAssignmentsChecker` - Execute the ALZPolicyAssignmentsChecker feature - New Parameter `-ALZManagementGroupsIds` - Provide the Management Group Ids of the deployed ALZ hierarchy (more details: [Parameters](#parameters))
2 parents de221e5 + 39ed74b commit 6f245aa

File tree

9 files changed

+1424
-426
lines changed

9 files changed

+1424
-426
lines changed

.azuredevops/pipelines/AzGovViz.variables.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Azure Governance Visualizer v6_major_20231113_1
1+
# Azure Governance Visualizer 6.7.0
22
# First things first:
33
# 1. Replace <YourServiceConnection> with the name of your service connection
44
# 2. Replace <YourManagementGroupId> with the your ManagementGroupId
@@ -340,6 +340,16 @@ variables:
340340
# Switch | example: value: true
341341
value:
342342

343+
# Execute Azure Landing Zones (ALZ) Policy Assignments Checker
344+
- name: ALZPolicyAssignmentsChecker
345+
# Switch | example: value: true
346+
value:
347+
348+
# ALZ Management Group Ids for the Azure Landing Zones (ALZ) Policy Assignments Checker
349+
- name: ALZManagementGroupsIds
350+
# Hashtable | example:
351+
value: '@{"root"= "alz-root";"platform"="alz-platform";"connectivity"="alz-connectivity";"identity"="alz-identity";"management"="alz-management";"landing_zones"="alz-landing-zones";"corp"="alz-corp";"online"="alz-online";"sandboxes"="alz-sandboxes";"decommissioned"="alz-decommissioned"}'
352+
343353
# Create a dedicated DefinitionInsights HTML file
344354
- name: NoDefinitionInsightsDedicatedHTML
345355
# Switch | example: value: true
@@ -369,4 +379,4 @@ variables:
369379
value: ${{ join(',',parameters.StorageAccountAccessAnalysisSubscriptionTagsParameters) }}
370380

371381
- name: StorageAccountAccessAnalysisStorageAccountTags
372-
value: ${{ join(',',parameters.StorageAccountAccessAnalysisStorageAccountTagsParameters) }}
382+
value: ${{ join(',',parameters.StorageAccountAccessAnalysisStorageAccountTagsParameters) }}

README.md

Lines changed: 85 additions & 69 deletions
Large diffs are not rendered by default.

history.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
### Azure Governance Visualizer version 6
66

7+
**Changes** (2025-May-19 / 6.7.0 Minor)
8+
9+
- New feature "ALZ Policy Assignments Checker" - This new view, will compare the current deployed ALZ hierarchy with the ALZ archetypes definitions and point out the missing policy assignments. It will also reference the missing policy assignments' payloads and [AzAdvertizer](https://www.azadvertizer.net/) links.
10+
- New switch-parameter `-ALZPolicyAssignmentsChecker` - Execute the ALZPolicyAssignmentsChecker feature
11+
- New Parameter `-ALZManagementGroupsIds` - Provide the Management Group Ids of the deployed ALZ hierarchy (more details: [Parameters](#parameters))
12+
713
**Changes** (2025-May-01 / 6.6.3 Patch)
814

915
- [issue53](https://github.com/Azure/Azure-Governance-Visualizer/issues/53)
@@ -14,6 +20,9 @@
1420
- update API-version `2020-07-01-preview` to `2023-01-01` for '/subscriptions/`subscriptionId`/providers/Microsoft.Advisor/advisorScore'
1521
- [issue276](https://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting/issues/276)
1622
- fix -> Getting Microsoft Defender for Cloud Secure Score for Subscription; skip on error-code `431 (RequestHeaderFieldsTooLarge)`
23+
- New feature "ALZ Policy Assignments Checker" - This new view, will compare the current deployed ALZ hierarchy with the ALZ archetypes definitions and point out the missing policy assignments. It will also reference the missing policy assignments' payloads and [AzAdvertizer](https://www.azadvertizer.net/) links.
24+
- New switch-parameter `-ALZPolicyAssignmentsChecker` - Execute the ALZPolicyAssignmentsChecker feature
25+
- New Parameter `-ALZManagementGroupsIds` - Provide the Management Group Ids of the deployed ALZ hierarchy (more details:[Parameters](#parameters))
1726

1827
**Changes** (2024-November-01 / 6.6.1 Patch)
1928

pwsh/AzGovVizParallel.ps1

Lines changed: 833 additions & 352 deletions
Large diffs are not rendered by default.

pwsh/dev/devAzGovVizParallel.ps1

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,27 @@
167167
If you do not want to execute the 'Azure Landing Zones (ALZ) Policy Version Checker' feature then use this parameter
168168
PS C:\>.\AzGovVizParallel.ps1 -ManagementGroupId <your-Management-Group-Id> -NoALZPolicyVersionChecker
169169
170+
.Parameter ALZPolicyAssignmentsChecker
171+
'Azure Landing Zones (ALZ) Policy Assignments Checker' for Policy and Set assignments. Azure Governance Visualizer will clone the ALZ Library GitHub repository and collect the standard ALZ policy and set assignments. The ALZ data will be compared with the data from your tenant so that you can get an inventory for ALZ policy and set assignments that already exist in your tenant and compare with the standard assignments of ALZ. The 'Azure Landing Zones (ALZ) Policy Assignments Checker' results will be displayed in the TenantSummary.
172+
If you do want to execute the 'Azure Landing Zones (ALZ) Policy Version Checker' feature then use this parameter
173+
PS C:\>.\AzGovVizParallel.ps1 -ManagementGroupId <your-Management-Group-Id> -NoALZPolicyVersionChecker
174+
175+
.Parameter ALZManagementGroupsIds
176+
'Azure Landing Zones (ALZ) Management groups Ids'. This is the list of Ids of the ALZ management groups hierarchy.
177+
This is required if ALZPolicyAssignmentsChecker is enabled. If a management group Id is not provided, the default Id will be checked
178+
PS C:\>.\AzGovVizParallel.ps1 -ManagementGroupId <your-Management-Group-Id> -ALZPolicyAssignmentsChecker -ALZManagementGroupsIds @{
179+
root = '<Intermediary root management group Id>'
180+
platform = '<Platform management group Id>'
181+
connectivity = '<Connectivity management group Id>'
182+
identity = '<Identity management group Id>'
183+
management = '<Management management group Id>'
184+
landing_zones = '<Landing_zones management group Id>'
185+
corp = '<Corp management group Id>'
186+
online = '<Online management group Id>'
187+
sandboxes = '<Sandboxes management group Id>'
188+
decommissioned = '<Decommissioned management group Id>'
189+
}
190+
170191
.PARAMETER NoDefinitionInsightsDedicatedHTML
171192
DefinitionInsights will be written to a separate HTML file `*_DefinitionInsights.html`. If you want to keep DefinitionInsights in the main html file then use this parameter
172193
PS C:\>.\AzGovVizParallel.ps1 -ManagementGroupId <your-Management-Group-Id> -NoDefinitionInsightsDedicatedHTML
@@ -341,6 +362,20 @@
341362
Define if the 'Azure Landing Zones (ALZ) Policy Version Checker' feature should not be executed
342363
PS C:\>.\AzGovVizParallel.ps1 -ManagementGroupId <your-Management-Group-Id> -NoALZPolicyVersionChecker
343364
365+
Define if the 'Azure Landing Zones (ALZ) Policy assignments Checker' feature should be executed
366+
PS C:\>.\AzGovVizParallel.ps1 -ManagementGroupId <your-Management-Group-Id> -ALZPolicyAssignmentsChecker -ALZManagementGroupsIds @{
367+
root = '<Intermediary root management group Id>'
368+
platform = '<Platform management group Id>'
369+
connectivity = '<Connectivity management group Id>'
370+
identity = '<Identity management group Id>'
371+
management = '<Management management group Id>'
372+
landing_zones = '<Landing_zones management group Id>'
373+
corp = '<Corp management group Id>'
374+
online = '<Online management group Id>'
375+
sandboxes = '<Sandboxes management group Id>'
376+
decommissioned = '<Decommissioned management group Id>'
377+
}
378+
344379
Define if DefinitionInsights should not be written to a seperate html file (*_DefinitionInsights.html)
345380
PS C:\>.\AzGovVizParallel.ps1 -ManagementGroupId <your-Management-Group-Id> -NoDefinitionInsightsDedicatedHTML
346381
@@ -371,7 +406,7 @@ Param
371406
$Product = 'AzGovViz',
372407

373408
[string]
374-
$ProductVersion = '6.6.3',
409+
$ProductVersion = '6.7.0',
375410

376411
[string]
377412
$GithubRepository = 'aka.ms/AzGovViz',
@@ -569,6 +604,23 @@ Param
569604
[switch]
570605
$NoALZPolicyVersionChecker,
571606

607+
[switch]
608+
$ALZPolicyAssignmentsChecker,
609+
610+
[hashtable]
611+
$ALZManagementGroupsIds <#= @{
612+
root = '<Intermediary root management group Id>'
613+
platform = '<Platform management group Id>'
614+
connectivity = '<Connectivity management group Id>'
615+
identity = '<Identity management group Id>'
616+
management = '<Management management group Id>'
617+
landing_zones = '<Landing_zones management group Id>'
618+
corp = '<Corp management group Id>'
619+
online = '<Online management group Id>'
620+
sandboxes = '<Sandboxes management group Id>'
621+
decommissioned = '<Decommissioned management group Id>'
622+
}#>,
623+
572624
[switch]
573625
$NoDefinitionInsightsDedicatedHTML,
574626

@@ -694,6 +746,7 @@ if ($ManagementGroupId -match ' ') {
694746
. ".\$($ScriptPath)\functions\processNetwork.ps1"
695747
. ".\$($ScriptPath)\functions\processStorageAccountAnalysis.ps1"
696748
. ".\$($ScriptPath)\functions\processALZPolicyVersionChecker.ps1"
749+
. ".\$($ScriptPath)\functions\processALZPolicyAssignmentsChecker.ps1"
697750
. ".\$($ScriptPath)\functions\getPIMEligible.ps1"
698751
. ".\$($ScriptPath)\functions\testGuid.ps1"
699752
. ".\$($ScriptPath)\functions\apiCallTracking.ps1"
@@ -1073,6 +1126,7 @@ if (-not $HierarchyMapOnly) {
10731126
$htHashesBuiltInPolicy = [System.Collections.Hashtable]::Synchronized(@{})
10741127
$arrayCustomBuiltInPolicyParity = [System.Collections.ArrayList]@()
10751128
$arrayRemediatable = [System.Collections.ArrayList]@()
1129+
$ALZPolicyAssignmentsDifferences = @{}
10761130
}
10771131

10781132
if (-not $HierarchyMapOnly) {
@@ -1273,6 +1327,35 @@ if (-not $HierarchyMapOnly) {
12731327
showMemoryUsage
12741328
}
12751329
}
1330+
1331+
if (-not $HierarchyMapOnly) {
1332+
if ($ALZPolicyAssignmentsChecker -and $ALZManagementGroupsIds.Count -gt 0) {
1333+
switch ($azAPICallConf['checkContext'].Environment.Name) {
1334+
'Azurecloud' {
1335+
Write-Host "'Azure Landing Zones (ALZ) Policy Assignments Checker' feature supported for Cloud environment '$($azAPICallConf['checkContext'].Environment.Name)'"
1336+
processALZPolicyAssignmentsChecker
1337+
}
1338+
'AzureChinaCloud' {
1339+
Write-Host "'Azure Landing Zones (ALZ) Policy Assignments Checker' feature supported for Cloud environment '$($azAPICallConf['checkContext'].Environment.Name)'"
1340+
processALZPolicyAssignmentsChecker
1341+
}
1342+
'AzureUSGovernment' {
1343+
Write-Host "'Azure Landing Zones (ALZ) Policy Assignments Checker' feature supported for Cloud environment '$($azAPICallConf['checkContext'].Environment.Name)'"
1344+
processALZPolicyAssignmentsChecker
1345+
}
1346+
Default {
1347+
Write-Host "'Azure Landing Zones (ALZ) Policy Assignments Checker' feature NOT supported for Cloud environment '$($azAPICallConf['checkContext'].Environment.Name)'"
1348+
Write-Host "Setting parameter -ALZPolicyAssignmentsChecker to 'false'"
1349+
$ALZPolicyAssignmentsChecker = $false
1350+
}
1351+
}
1352+
}
1353+
else {
1354+
#Write-Host "Skipping 'Azure Landing Zones (ALZ) Policy Assignments Checker' (parameter -ALZPolicyAssignmentsChecker = $ALZPolicyAssignmentsChecker)"
1355+
}
1356+
}
1357+
1358+
12761359
#endregion runDataCollection
12771360

12781361
#region createoutputs

pwsh/dev/functions/addHtParameters.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@
3636
DoPSRule = [bool]$DoPSRule
3737
PSRuleFailedOnly = [bool]$PSRuleFailedOnly
3838
NoALZPolicyVersionChecker = [bool]$NoALZPolicyVersionChecker
39+
ALZPolicyAssignmentsChecker = [bool]$ALZPolicyAssignmentsChecker
40+
ALZManagementGroupsIds = $ALZManagementGroupsIds
3941
NoStorageAccountAccessAnalysis = [bool]$NoStorageAccountAccessAnalysis
4042
GitHubActionsOIDC = [bool]$GitHubActionsOIDC
4143
NoNetwork = [bool]$NoNetwork
4244
ThrottleLimit = $ThrottleLimit
4345
APIMappingCloudEnvironment = $APIMappingCloudEnvironment
4446
}
4547
Write-Host 'htParameters:'
46-
$azAPICallConf['htParameters'] | Format-Table -AutoSize | Out-String
48+
$azAPICallConf['htParameters'] | ConvertTo-Json -Depth 99 | Out-String
4749
Write-Host 'Add Azure Governance Visualizer htParameters succeeded' -ForegroundColor Green
4850
}

0 commit comments

Comments
 (0)