{ "mode": "All", "policyRule": { "if": { "allOf": [ { "field": "type", "equals": "Microsoft.Resources/subscriptions/resourceGroups" }, { "field": "[concat('tags[', parameters('tagName1'), ']')]", "exists": "false" }, { "field": "[concat('tags[', parameters('tagName2'), ']')]", "exists": "false" }, { "field": "[concat('tags[', parameters('tagName3'), ']')]", "exists": "false" } ] }, "then": { "effect": "modify", "details": { "roleDefinitionIds": [ "/providers/microsoft.authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c" ], "operations": [ { "operation": "add", "field": "[concat('tags[', parameters('tagName1'), ']')]", "value": "" }, { "operation": "add", "field": "[concat('tags[', parameters('tagName2'), ']')]", "value": "" }, { "operation": "add", "field": "[concat('tags[', parameters('tagName3'), ']')]", "value": "" } ] } } }, "parameters": { "tagName1": { "type": "String", "metadata": { "displayName": "Tag Name 1", "description": "Name of the tag, such as 'environment'" } }, "tagName2": { "type": "String", "metadata": { "displayName": "Tag Name 2", "description": "Name of the tag, such as 'environment'" } }, "tagName3": { "type": "String", "metadata": { "displayName": "Tag Name 2", "description": "Name of the tag, such as 'environment'" } } } }