It seems a new policy has been added that prevents creating AKS cluster. The new policy requires the name of the VMSS to be “app-scaleset” but this name is auto generated by Azure from the name of agent pool.
╷
│ Error: creating Kubernetes Cluster (Subscription: "a2b28c85-1948-4263-90ca-bade2bac4df4"
│ Resource Group Name: "kml_rg_main-e24c4a2605254797"
│ Kubernetes Cluster Name: "test"): polling after CreateOrUpdate: polling failed: the Azure API returned the following error:
│
│ Status: "RequestDisallowedByPolicy"
│ Code: "RequestDisallowedByPolicy"
│ Message: "Code=\"RequestDisallowedByPolicy\" Message=\"Resource 'aks-agentpool-26092134-vmss' was disallowed by policy. Reasons: 'Allowed values – VMSS Name = 'app-scaleset' | Scaleset Maximum Count = 3\\n| Allowed SKUs: ['Standard_D2s_v3', 'Standard_K8S2_v1','Standard_K8S_v1','Standard_B2s', 'Standard_B1s', 'Standard_DS1_v2', 'Standard_B4ms']. Update configuration to comply.'. See error details for policy resource IDs.\" Target=\"aks-agentpool-26092134-vmss\" AdditionalInfo=[{\"info\":{\"evaluationDetails\":{\"evaluatedExpres\nResource 'aks-agentpool-26092134-vmss' was disallowed by policy. Reasons: 'Allowed values – VMSS Name = 'app-scaleset' | Scaleset Maximum Count = 3\n| Allowed SKUs: ['Standard_D2s_v3', 'Standard_K8S2_v1','Standard_K8S_v1','Standard_B2s', 'Standard_B1s', 'Standard_DS1_v2', 'Standard_B4ms']. Update configuration to comply.'. See error details for policy resource IDs."
│ Activity Id: ""
│
│ ---
│
│ API Response:
│
│ ----[start]----
│ {
│ "name": "815a269f-5bb9-4670-8188-fcde58a3696d",
│ "status": "Failed",
│ "startTime": "2025-02-25T15:21:26.590221Z",
│ "endTime": "2025-02-25T15:22:37.8426333Z",
│ "error": {
│ "code": "RequestDisallowedByPolicy",
│ "message": "Code=\"RequestDisallowedByPolicy\" Message=\"Resource 'aks-agentpool-26092134-vmss' was disallowed by policy. Reasons: 'Allowed values – VMSS Name = 'app-scaleset' | Scaleset Maximum Count = 3\\n| Allowed SKUs: ['Standard_D2s_v3', 'Standard_K8S2_v1','Standard_K8S_v1','Standard_B2s', 'Standard_B1s', 'Standard_DS1_v2', 'Standard_B4ms']. Update configuration to comply.'. See error details for policy resource IDs.\" Target=\"aks-agentpool-26092134-vmss\" AdditionalInfo=[{\"info\":{\"evaluationDetails\":{\"evaluatedExpres",
│ "details": [
│ {
│ "code": "RequestDisallowedByPolicy",
│ "message": "Resource 'aks-agentpool-26092134-vmss' was disallowed by policy. Reasons: 'Allowed values – VMSS Name = 'app-scaleset' | Scaleset Maximum Count = 3\n| Allowed SKUs: ['Standard_D2s_v3', 'Standard_K8S2_v1','Standard_K8S_v1','Standard_B2s', 'Standard_B1s', 'Standard_DS1_v2', 'Standard_B4ms']. Update configuration to comply.'. See error details for policy resource IDs.",
│ "target": "aks-agentpool-26092134-vmss"
│ }
│ ]
│ }
│ }
│ -----[end]-----
│
│
│ with azurerm_kubernetes_cluster.test,
│ on main.tf line 73, in resource "azurerm_kubernetes_cluster" "test":
│ 73: resource "azurerm_kubernetes_cluster" "test" {
│
╵