Plan does not validate/catch missing/non-existing nonComplianceMessage\policyDefinitionReferenceId in policyAssignments.
Deploy then crashes when EPAC calls Set-AzPolicyAssignmentRestMethod with error:
{
"error": {
"code": "InvalidCreatePolicyAssignmentRequest",
"message": "The policy assignment request is invalid. The following policy definition reference IDs used in non-compliance messages do not exist in the assigned policy set definition: '<redacted>'."
}
}
Would be great if EPAC could validate this during plan.
To Reproduce
In a policyAssignments: Create a nonComplianceMessage with policyDefinitionReferenceId to a policyDefinition or a policySetDefinition that does not exist.
Describe the bug
Plan does not validate/catch missing/non-existing
nonComplianceMessage\policyDefinitionReferenceId
inpolicyAssignments
.Deploy then crashes when EPAC calls
Set-AzPolicyAssignmentRestMethod
with error:Would be great if EPAC could validate this during plan.
To Reproduce
In a
policyAssignments
: Create anonComplianceMessage
withpolicyDefinitionReferenceId
to apolicyDefinition
or apolicySetDefinition
that does not exist.Expected behavior
Catch this in plan.
Screenshots
No thanks.
EPAC Version
v10.6.0