Skip to content

Commit 43e6a55

Browse files
committed
add precondition
1 parent 39d4b22 commit 43e6a55

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,13 @@ resource "azurerm_kubernetes_cluster_node_pool" "node_pool" {
476476
outbound_nat_enabled = each.value.windows_profile.outbound_nat_enabled
477477
}
478478
}
479+
480+
lifecycle {
481+
precondition {
482+
condition = var.agents_type == "VirtualMachineScaleSets"
483+
error_message = "Multiple Node Pools are only supported when the Kubernetes Cluster is using Virtual Machine Scale Sets."
484+
}
485+
}
479486
}
480487

481488
resource "azurerm_log_analytics_workspace" "main" {

0 commit comments

Comments
 (0)