Changes (2023-Mar-20 / Major)
- Fix/update feature Policy Remediation
- Optimze the Azure Resource Graph query by adding sort, due to duplicates/missing entries for results > 1k
- Analysis on issue #175 (no real explanation, but fixed by using
IsNullOrWhiteSpace
instead ofIsNullOrEmpty
)
$htdetails0 = @"
{
"then": {
"details": [
{
"field": "Microsoft.ContainerInstance/containerGroups/diagnostics.logAnalytics.workspaceId",
"value": "[parameters('workspaceId')]"
}
]
}
}
"@
$htdetails1 = @"
{
"then": {
"details": [
{
"field": "Microsoft.ContainerInstance/containerGroups/diagnostics.logAnalytics.workspaceId",
"value": "[parameters('workspaceId')]"
},
{
"field": "Microsoft.ContainerInstance/containerGroups/diagnostics.logAnalytics.workspaceKey",
"value": "[parameters('workspaceKey')]"
}
]
}
}
"@
$obj0 = $htdetails0 | ConvertFrom-Json
if (-not [string]::IsNullOrEmpty($obj0.then.details.roleDefinitionIds)) {
Write-Host 'obj0 roleDefinitionIds not empty'
}
else {
Write-Host 'obj0 roleDefinitionIds empty'
}
$obj1 = $htdetails1 | ConvertFrom-Json
if (-not [string]::IsNullOrEmpty($obj1.then.details.roleDefinitionIds)) {
Write-Host 'obj1 roleDefinitionIds not empty'
}
else {
Write-Host 'obj1 roleDefinitionIds empty'
}