last sync: 2020-Oct-30 14:31:57 UTC

Azure Policy definition

Azure Event Grid topics should use private links

Name Azure Event Grid topics should use private links
Azure Portal
Id 4b90e17e-8448-49db-875e-bd83fb6f804f
Version 1.0.0
details on versioning
Category Event Grid
Microsoft docs
Description Audit Azure Event Grid topics that do not have at least one approved private endpoint connection. Clients in a virtual network can securely access resources that have private endpoint connections via private links. For more information, visit https://aka.ms/privateendpoints.
Mode Indexed
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: Audit
Allowed: (Audit, Disabled)
Used RBAC Role none
History
Date/Time (UTC ymd) (i) Change type Change detail
2020-05-29 15:39:09 add 4b90e17e-8448-49db-875e-bd83fb6f804f
Used in Initiatives none
Json
{
  "properties": {
    "displayName": "Azure Event Grid topics should use private links",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Audit Azure Event Grid topics that do not have at least one approved private endpoint connection. Clients in a virtual network can securely access resources that have private endpoint connections via private links. For more information, visit https://aka.ms/privateendpoints.",
    "metadata": {
      "version": "1.0.0",
      "category": "Event Grid"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        },
        "allowedValues": [
          "Audit",
          "Disabled"
        ],
        "defaultValue": "Audit"
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.EventGrid/topics"
          },
          {
            "count": {
            "field": "Microsoft.EventGrid/topics/privateEndpointConnections[*]",
              "where": {
              "field": "Microsoft.EventGrid/topics/privateEndpointConnections[*].privateLinkServiceConnectionState.status",
                "equals": "Approved"
              }
            },
            "less": 1
          }
        ]
      },
      "then": {
      "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/4b90e17e-8448-49db-875e-bd83fb6f804f",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "4b90e17e-8448-49db-875e-bd83fb6f804f"
}