Skip to content

Commit

Permalink
v6_major_20230124_1
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianHayward committed Jan 24, 2023
1 parent e362b10 commit 37c3b89
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 15 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,10 @@ Listed as [security monitoring tool](https://docs.microsoft.com/en-us/azure/arch

## Release history

__Changes__ (2023-Jan-19 / Major)
__Changes__ (2023-Jan-24 / Major)

* Cover Preview [Azure Storage Account with Azure DNS zone endpoints](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview#azure-dns-zone-endpoints-preview) ([Issue #164](https://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting/issues/164))
* Add feature to simulate Management Group Hierarchy Map
* New parameter `-HierarchyMapOnlyCustomData` (documentation update pending)
* Private Endpoint feature - add Microsoft tenants (cross tenant PE) (`-MSTenantIds`)
* Use [AzAPICall](https://aka.ms/AzAPICall) PowerShell module version 1.1.67
* Use [AzAPICall](https://aka.ms/AzAPICall) PowerShell module version 1.1.68
* fix issue for Private DNS Zone resource diagnostics capability check

Passed tests: Powershell Core 7.3.0 on Windows
Passed tests: Powershell Core 7.2.7 Azure DevOps hosted agent ubuntu-22.04
Expand Down
5 changes: 5 additions & 0 deletions history.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

### AzGovViz version 6

__Changes__ (2023-Jan-24 / Major)

* Use [AzAPICall](https://aka.ms/AzAPICall) PowerShell module version 1.1.68
* fix issue for Private DNS Zone resource diagnostics capability check

__Changes__ (2023-Jan-19 / Major)

* Cover Preview [Azure Storage Account with Azure DNS zone endpoints](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview#azure-dns-zone-endpoints-preview) ([Issue #164](https://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting/issues/164))
Expand Down
17 changes: 13 additions & 4 deletions pwsh/AzGovVizParallel.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ Param
$Product = 'AzGovViz',

[string]
$AzAPICallVersion = '1.1.67',
$AzAPICallVersion = '1.1.68',

[string]
$ProductVersion = 'v6_major_20230119_1',
$ProductVersion = 'v6_major_20230124_1',

[string]
$GithubRepository = 'aka.ms/AzGovViz',
Expand Down Expand Up @@ -2318,7 +2318,9 @@ function exportBaseCSV {
$startBuildCSV = Get-Date

$outprops = $newtable[0].PSObject.Properties.Name
$outprops.Set($outprops.IndexOf('PolicyAssignmentNotScopes'), @{L = 'PolicyAssignmentNotScopes'; E = { ($_.PolicyAssignmentNotScopes -join "$CsvDelimiterOpposite ") } })
if (-not $HierarchyMapOnly -and -not $HierarchyMapOnlyCustomDataJSON) {
$outprops.Set($outprops.IndexOf('PolicyAssignmentNotScopes'), @{L = 'PolicyAssignmentNotScopes'; E = { ($_.PolicyAssignmentNotScopes -join "$CsvDelimiterOpposite ") } })
}
if ($CsvExportUseQuotesAsNeeded) {
$newTable | Sort-Object -Property level, mgId, SubscriptionId, PolicyAssignmentId, RoleAssignmentId, BlueprintId, BlueprintAssignmentId | Select-Object -Property $outprops -ExcludeProperty PolicyAssignmentParameters | Export-Csv -Path "$($outputPath)$($DirectorySeparatorChar)$($fileName).csv" -Delimiter "$csvDelimiter" -NoTypeInformation -UseQuotes AsNeeded
}
Expand Down Expand Up @@ -7268,12 +7270,18 @@ function processHierarchyMapOnlyCustomData {
#validate
Write-Host ' ManagementGroupId validation'
if (-not $ManagementGroupId) {
Write-Host ' ManagementGroupId validation failed - please provide ManagementGroupId (parameter -ManagementGroupId)'
throw 'ManagementGroupId validation failed - please provide ManagementGroupId (parameter -ManagementGroupId)'
}
else {
if ($hierarchyMapOnlyCustomData.$ManagementGroupId) {
Write-Host " ManagementGroupId '$ManagementGroupId' is available in 'hierarchyMapOnlyCustomData'"
}
else {
throw "ManagementGroupId validation failed - Given ManagementGroupId '$ManagementGroupId' is NOT available in 'hierarchyMapOnlyCustomData'"
}
Write-Host " ManagementGroupId validation passed '$ManagementGroupId'" -ForegroundColor Green
}

Write-Host ' CustomData validation'
if ($hierarchyMapOnlyCustomData.Keys.Count -gt 0) {
Write-Host ' Checking Keys (sanity check on first item)'
Expand Down Expand Up @@ -27874,6 +27882,7 @@ function stats {
"identifier": "$($statsIdentifier)",
"platform": "$($azAPICallConf['htParameters'].CodeRunPlatform)",
"productVersion": "$($ProductVersion)",
"AzAPICallVersion": "$($AzAPICallVersion)",
"psAzAccountsVersion": "$($azAPICallConf['htParameters'].AzAccountsVersion)",
"psVersion": "$($PSVersionTable.PSVersion)",
"scopeUsage": "$($scopeUsage)",
Expand Down
4 changes: 2 additions & 2 deletions pwsh/dev/devAzGovVizParallel.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ Param
$Product = 'AzGovViz',

[string]
$AzAPICallVersion = '1.1.67',
$AzAPICallVersion = '1.1.68',

[string]
$ProductVersion = 'v6_major_20230119_1',
$ProductVersion = 'v6_major_20230124_1',

[string]
$GithubRepository = 'aka.ms/AzGovViz',
Expand Down
4 changes: 3 additions & 1 deletion pwsh/dev/functions/exportBaseCSV.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ function exportBaseCSV {
$startBuildCSV = Get-Date

$outprops = $newtable[0].PSObject.Properties.Name
$outprops.Set($outprops.IndexOf('PolicyAssignmentNotScopes'), @{L = 'PolicyAssignmentNotScopes'; E = { ($_.PolicyAssignmentNotScopes -join "$CsvDelimiterOpposite ") } })
if (-not $HierarchyMapOnly -and -not $HierarchyMapOnlyCustomDataJSON) {
$outprops.Set($outprops.IndexOf('PolicyAssignmentNotScopes'), @{L = 'PolicyAssignmentNotScopes'; E = { ($_.PolicyAssignmentNotScopes -join "$CsvDelimiterOpposite ") } })
}
if ($CsvExportUseQuotesAsNeeded) {
$newTable | Sort-Object -Property level, mgId, SubscriptionId, PolicyAssignmentId, RoleAssignmentId, BlueprintId, BlueprintAssignmentId | Select-Object -Property $outprops -ExcludeProperty PolicyAssignmentParameters | Export-Csv -Path "$($outputPath)$($DirectorySeparatorChar)$($fileName).csv" -Delimiter "$csvDelimiter" -NoTypeInformation -UseQuotes AsNeeded
}
Expand Down
8 changes: 7 additions & 1 deletion pwsh/dev/functions/processHierarchyMapOnlyCustomData.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ function processHierarchyMapOnlyCustomData {
#validate
Write-Host ' ManagementGroupId validation'
if (-not $ManagementGroupId) {
Write-Host ' ManagementGroupId validation failed - please provide ManagementGroupId (parameter -ManagementGroupId)'
throw 'ManagementGroupId validation failed - please provide ManagementGroupId (parameter -ManagementGroupId)'
}
else {
if ($hierarchyMapOnlyCustomData.$ManagementGroupId) {
Write-Host " ManagementGroupId '$ManagementGroupId' is available in 'hierarchyMapOnlyCustomData'"
}
else {
throw "ManagementGroupId validation failed - Given ManagementGroupId '$ManagementGroupId' is NOT available in 'hierarchyMapOnlyCustomData'"
}
Write-Host " ManagementGroupId validation passed '$ManagementGroupId'" -ForegroundColor Green
}

Write-Host ' CustomData validation'
if ($hierarchyMapOnlyCustomData.Keys.Count -gt 0) {
Write-Host ' Checking Keys (sanity check on first item)'
Expand Down
1 change: 1 addition & 0 deletions pwsh/dev/functions/stats.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function stats {
"identifier": "$($statsIdentifier)",
"platform": "$($azAPICallConf['htParameters'].CodeRunPlatform)",
"productVersion": "$($ProductVersion)",
"AzAPICallVersion": "$($AzAPICallVersion)",
"psAzAccountsVersion": "$($azAPICallConf['htParameters'].AzAccountsVersion)",
"psVersion": "$($PSVersionTable.PSVersion)",
"scopeUsage": "$($scopeUsage)",
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v6_major_20230119_1
v6_major_20230124_1

0 comments on commit 37c3b89

Please sign in to comment.