{
  "properties": {
    "displayName": "Enforce https traffic on all Web Apps",
    "policyType": "Custom",
    "description": "This policy ensures that only https traffic is allowed on all Web Apps",
    "mode": "Indexed",
    "metadata": {
      "category": "Web App"
    },
    "parameters": {},
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.Web/sites"
          },
          {
            "not": {
              "field": "Microsoft.Web/sites/httpsOnly",
              "equals": "true"
            }
          }
        ]
      },
      "then": {
        "effect": "deny"
      }
    }
  }
}