From 56c81aea7a66bcbfcb0e8d66d03c9e36a0600ec3 Mon Sep 17 00:00:00 2001 From: Anthony Hausman Date: Tue, 26 Mar 2024 16:10:05 +0100 Subject: [PATCH] feat(gke-cluster-standard): Improve `default_node_pool` condition validation --- modules/gke-cluster-standard/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gke-cluster-standard/variables.tf b/modules/gke-cluster-standard/variables.tf index 00ab1d8461..36a2ff7f5a 100644 --- a/modules/gke-cluster-standard/variables.tf +++ b/modules/gke-cluster-standard/variables.tf @@ -123,7 +123,7 @@ variable "default_node_pool" { nullable = false validation { - condition = ((var.default_node_pool.remove_pool == true && var.default_node_pool.initial_node_count == null) || (var.default_node_pool.remove_pool == false && var.default_node_pool.initial_node_count != null)) + condition = (var.default_node_pool.remove_pool != (var.default_node_pool.initial_node_count != null)) error_message = "If `remove_pool` is set to false, `initial_node_count` need be set." } }