The order of parameters in /Microsoft.GuestConfiguration/guestConfigurationAssignments properties.parameterHash is unclear if multiple resources defined in DSC configuration
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- powershell
- Domain
- cloud
Research direction
Start by reproducing the issue with New-GuestConfigurationPolicy -Parameter and DSC configurations containing one and multiple resources. Inspect how properties.parameterHash is assembled and compare its parameter order with the generated policy definition. Done means multiple-resource configurations produce a stable, matching order so the Azure Policy existenceCondition reports compliance.
Written by the indexing model from the issue text.
Description
I will summarize in short for those, who do not know.
The AzureRM resource /Microsoft.GuestConfiguration/guestConfigurationAssignments advertise the property properties.parameterHash. In Base 64 format it contains series of [ResourceType]ResourceId;ResourcePreoperty'=ResourceValue.
The New-GuestConfigurationPolicy generated Azure Policy definition which internally relies on this parameter. Example:
"existenceCondition": {
"allOf": [
{
"field": "Microsoft.GuestConfiguration/guestConfigurationAssignments/complianceStatus",
"equals": "Compliant"
},
{
"field": "Microsoft.GuestConfiguration/guestConfigurationAssignments/parameterHash",
"equals": "[base64(concat('[DSC_HardeningAuditpol]AuditpolInstance;BackupAuditpol', '=', parameters('AuditpolBackupAuditpol'), ',', '[DSC_HardeningAuditpol]AuditpolInstance;HardeningLevel', '=', parameters('AuditpolHardeningLevel'),
The order matters. Else the Policy will never show the compliance. New-GuestConfigurationPolicy -Parameter $PolicyParameterInfo where $PolicyParameterInfo should have propper order.
As per my tests:
- if the DSC Configuraiton contains one reosurce, the paramaters in
properties.parameterHashare in alphabetical order. - if the DSC Configuraiton contains multiple reosurce, the paramaters in
properties.parameterHashare loosing order, at least i cannot identify it.
Has any one came across this issue?
My company requires automated solution to generate Azure Policies and currently this is blocker for me
- Dominant language
- PowerShell
- Stars
- 8
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/GuestConfiguration
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Azure/GuestConfiguration#322 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Azure/GuestConfiguration#320 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Azure/GuestConfiguration#319 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Azure/GuestConfiguration#312 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Azure/GuestConfiguration#308 · 1 comment ·
All issues in Azure/GuestConfiguration
Similar issues
-
Language: Terraform :globe_with_meridians: Needs: Triage :mag: Type: Bug :bug:
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Azure/terraform-azurerm-avm-res-containerregistry-registry#230 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100