Skip to content

Use descriptive policy assignments#

Operational Excellence · Policy · Azure.Policy.AssignmentDescriptors

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:

{
    "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"
    }
}

Last update: 2021-09-24