{
   "properties": {
      "displayName": "Require a tag and its value on resources",
      "policyType": "BuiltIn",
      "mode": "Indexed",
      "description": "Enforces a required tag and its value. 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'"
            }
         },
         "tagValue": {
            "type": "String",
            "metadata": {
               "displayName": "Tag Value",
               "description": "Value of the tag, such as 'production'"
            }
         }
      },
      "policyRule": {
         "if": {
            "not": {
               "field": "[concat('tags[', parameters('tagName'), ']')]",
               "equals": "[parameters('tagValue')]"
            }
         },
         "then": {
            "effect": "deny"
         }
      }
   },
   "id": "/providers/Microsoft.Authorization/policyDefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
   "name": "1e30110a-5ceb-460c-a204-c1c3969c6d62"
}