Describe the bug
Discussed in #1625
Originally posted by dibcar June 30, 2022
How can I use the policyAssignments module for an policy initiative and configure a non-compliance message per policy? The nonComplanceMessages parameter is defined as a string instead of an array as defined in API version 2021-06-01.
Arm template :
"nonComplianceMessages": [
{
"message": "Default message"
},
{
"message": "Message for just this policy definition by reference ID",
"policyDefinitionReferenceId": "10420126870854049575"
}
]
Policy Assignment module exposes the 'NonComplianceMessages' property as a string instead of an array and converts it into an array in the logic. The other thing is that the parameter name should be plural aligning to the reference doc.
This should align with the ARM Reference documentation like the following:
nonComplianceMessages: [
{
message: 'string'
policyDefinitionReferenceId: 'string'
}
]
To reproduce
Try passing in the nonComplianceMessages as an array and it will fail.
Code snippet
param nonComplianceMessage string = ''
Relevant log output
No response
Describe the bug
Discussed in #1625
Originally posted by dibcar June 30, 2022
How can I use the policyAssignments module for an policy initiative and configure a non-compliance message per policy? The nonComplanceMessages parameter is defined as a string instead of an array as defined in API version 2021-06-01.
Arm template :
"nonComplianceMessages": [
{
"message": "Default message"
},
{
"message": "Message for just this policy definition by reference ID",
"policyDefinitionReferenceId": "10420126870854049575"
}
]
Policy Assignment module exposes the 'NonComplianceMessages' property as a string instead of an array and converts it into an array in the logic. The other thing is that the parameter name should be plural aligning to the reference doc.
This should align with the ARM Reference documentation like the following:
To reproduce
Try passing in the
nonComplianceMessagesas an array and it will fail.Code snippet
Relevant log output
No response