{
   "properties": {
      "displayName": "Require a tag on resources",
      "policyType": "BuiltIn",
      "mode": "Indexed",
      "description": "Enforces existence of a tag. Does not apply to resource groups.",
      "metadata": {
         "version": "1.0.1",
         "category": "Tags"
      },
      "parameters": {
         "tagName": {
            "type": "String",
            "metadata": {
               "displayName": "Tag Name",
               "description": "Name of the tag, such as 'environment'"
            }
         }
      },
      "policyRule": {
         "if": {
            "field": "[concat('tags[', parameters('tagName'), ']')]",
            "exists": "false"
         },
         "then": {
            "effect": "deny"
         }
      }
   },
   "id": "/providers/Microsoft.Authorization/policyDefinitions/871b6d14-10aa-478d-b590-94f262ecfa99",
   "name": "871b6d14-10aa-478d-b590-94f262ecfa99"
}