{
   "if": {
      "field": "[concat('tags[', parameters('tagName'), ']')]",
      "notEquals": "[parameters('tagValue')]"
   },
   "then": {
      "effect": "modify",
      "details": {
         "roleDefinitionIds": [
            "/providers/microsoft.authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
         ],
         "operations": [
            {
               "operation": "addOrReplace",
               "field": "[concat('tags[', parameters('tagName'), ']')]",
               "value": "[parameters('tagValue')]"
            }
         ]
      }
   }
}