{
  "properties": {
    "displayName": "Automation account variables should be encrypted",
    "policyType": "BuiltIn",
    "mode": "All",
    "description": "It is important to enable encryption of Automation account variable assets when storing sensitive data",
    "metadata": {
      "version": "1.1.0",
      "category": "Automation"
    },
    "parameters": {
      "effect": {
        "type": "string",
        "defaultValue": "Audit",
        "allowedValues": [
          "Audit",
          "Deny",
          "Disabled"
        ],
        "metadata": {
          "displayName": "Effect",
          "description": "The effect determines what happens when the policy rule is evaluated to match"
        }
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.Automation/automationAccounts/variables"
          },
          {
            "field": "Microsoft.Automation/automationAccounts/variables/isEncrypted",
            "notEquals": "true"
          }
        ]
      },
      "then": {
        "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/3657f5a0-770e-44a3-b44e-9431ba1e9735",
  "name": "3657f5a0-770e-44a3-b44e-9431ba1e9735"
}