{
  "properties": {
    "displayName": "[Limited Preview]: Ensure CPU and memory resource limits defined on containers in AKS",
    "policyType": "BuiltIn",
    "mode": "Microsoft.ContainerService.Data",
    "description": "This policy ensures CPU and memory resource limits are defined on containers in an Azure Kubernetes Service cluster. Limited Preview policies only work for registered subscriptions. To register, please go to https://aka.ms/akspolicyonboarding. For instruction on using this policy, please go to https://aka.ms/akspolicydoc.",
    "metadata": {
      "category": "Kubernetes service"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "defaultValue": "EnforceRegoPolicy",
        "allowedValues": [ "EnforceRegoPolicy", "Disabled" ],
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        }
      }
    },
    "policyRule": {
      "if": {
        "field": "type",
        "equals": "Microsoft.ContainerService/managedClusters"
      },
      "then": {
        "effect": "[parameters('effect')]",
        "details": {
          "policyId": "ContainerResourceLimits",
          "policy": "https://raw.githubusercontent.com/Azure/azure-policy/master/built-in-references/KubernetesService/container-resource-limits/limited-preview/gatekeeperpolicy.rego"
        }
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/a2d3ed81-8d11-4079-80a5-1faadc0024f4",
  "name": "a2d3ed81-8d11-4079-80a5-1faadc0024f4"
}