rules/Azure.Policy.Rule.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # # Validation rules for Azure Policy # # Synopsis: Policy and initiative definitions require display name, description and category set Rule 'Azure.Policy.Descriptors' -Type 'Microsoft.Authorization/policyDefinitions', 'Microsoft.Authorization/policySetDefinitions' -Tag @{ release = 'GA'; ruleSet = '2020_06' } { $Assert.HasFieldValue($TargetObject, 'properties.displayName'); $Assert.HasFieldValue($TargetObject, 'properties.description'); $Assert.HasFieldValue($TargetObject, 'properties.metadata.category'); } |