Skip to content

Use descriptive policy assignments#

Operational Excellence · Policy · Rule · 2021_06 · Awareness

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.displayName property with a valid value.
  • Set the properties.description property with a valid value.

For example:

Azure Template snippet
{
    "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"
    }
}

Comments