Use descriptive policy assignments
March 21, 2025 ยท View on GitHub
SYNOPSIS
Policy assignments should use a display name and description.
DESCRIPTION
Policy assignments can be configured with a display name and description. Use these additional properties to clearly convey the intent of the policy assignment.
RECOMMENDATION
Consider setting a display name and description for each policy assignment.
EXAMPLES
Azure templates
To deploy policy assignments that pass this rule:
- Set the
properties.displayNameproperty with a valid value. - Set the
properties.descriptionproperty with a valid value.
For example:
{
"comments": "Initiative assignment",
"name": "assignment-001",
"type": "Microsoft.Authorization/policyAssignments",
"apiVersion": "2019-06-01",
"properties": {
"displayName": "Assignment 001",
"description": "An example policy assignment.",
"metadata": {
"assignedBy": "DevOps pipeline"
},
"enforcementMode": "Default"
}
}