last sync: 2020-Jul-07 14:21:17 UTC

Azure Policy

Container Registries should use private links

Policy DisplayName Container Registries should use private links
Policy Id e8eef0a8-67cf-4eb4-9386-14b0e78733d4
Policy Category Container Registry
Policy Description Audit Container Registries 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 through private links. For more information, visit: https://aka.ms/acr/private-link.
Policy Mode Indexed
Policy Type BuiltIn
Policy in Preview FALSE
Policy Deprecated FALSE
Policy Effect Default: Audit
Allowed: (Audit,Disabled)
Roles used none
Policy Changes
Date/Time (UTC ymd) (i) Change Change detail
2020-04-28 14:50:57 add: Policy e8eef0a8-67cf-4eb4-9386-14b0e78733d4
2020-05-29 15:39:09 change: DisplayName previous DisplayName: [Preview]: Container Registries should use private links
Used in Policy Initiative(s) none
Policy Rule
{
  "properties": {
    "displayName": "Container Registries should use private links",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Audit Container Registries 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 through private links. For more information, visit: https://aka.ms/acr/private-link.",
    "metadata": {
      "version": "1.0.0",
      "category": "Container Registry"
    },
    "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.ContainerRegistry/registries"
          },
          {
            "count": {
            "field": "Microsoft.ContainerRegistry/registries/privateEndpointConnections[*]",
              "where": {
              "field": "Microsoft.ContainerRegistry/registries/privateEndpointConnections[*].privateLinkServiceConnectionState.status",
                "equals": "Approved"
              }
            },
            "less": 1
          }
        ]
      },
      "then": {
      "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/e8eef0a8-67cf-4eb4-9386-14b0e78733d4",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "e8eef0a8-67cf-4eb4-9386-14b0e78733d4"
}