It looks like KodeKloud has added a new policy that prevents creating AKS cluster. The policy requires the name of VMSS to be “app-scaleset” but the name is generated by Azure.
╷
│ 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-33844320-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-33844320-vmss\" AdditionalInfo=[{\"info\":{\"evaluationDetails\":{\"evaluatedExpres\nResource 'aks-agentpool-33844320-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": "0605d276-d949-4801-9006-9729cf6d97fd",
│ "status": "Failed",
│ "startTime": "2025-02-25T15:06:55.5932475Z",
│ "endTime": "2025-02-25T15:08:07.8430903Z",
│ "error": {
│ "code": "RequestDisallowedByPolicy",
│ "message": "Code=\"RequestDisallowedByPolicy\" Message=\"Resource 'aks-agentpool-33844320-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-33844320-vmss\" AdditionalInfo=[{\"info\":{\"evaluationDetails\":{\"evaluatedExpres",
│ "details": [
│ {
│ "code": "RequestDisallowedByPolicy",
│ "message": "Resource 'aks-agentpool-33844320-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-33844320-vmss"
│ }
│ ]
│ }
│ }
│ -----[end]-----
│
│
│ with azurerm_kubernetes_cluster.test,
│ on main.tf line 73, in resource "azurerm_kubernetes_cluster" "test":
│ 73: resource "azurerm_kubernetes_cluster" "test" {
│