diff --git a/autogen/safer-cluster/main.tf.tmpl b/autogen/safer-cluster/main.tf.tmpl index 380199b7da..adc37d5fea 100644 --- a/autogen/safer-cluster/main.tf.tmpl +++ b/autogen/safer-cluster/main.tf.tmpl @@ -77,11 +77,11 @@ module "gke" { maintenance_start_time = var.maintenance_start_time - initial_node_count = var.initial_node_count - // We suggest removing the default node pool, as it cannot be modified without // destroying the cluster. remove_default_node_pool = true + // If removing the default node pool, initial_node_count should be at least 1. + initial_node_count = (var.initial_node_count == 0) ? 1 : var.initial_node_count node_pools = var.node_pools node_pools_labels = var.node_pools_labels diff --git a/modules/safer-cluster-update-variant/main.tf b/modules/safer-cluster-update-variant/main.tf index 26175c802b..7284601e45 100644 --- a/modules/safer-cluster-update-variant/main.tf +++ b/modules/safer-cluster-update-variant/main.tf @@ -73,11 +73,11 @@ module "gke" { maintenance_start_time = var.maintenance_start_time - initial_node_count = var.initial_node_count - // We suggest removing the default node pool, as it cannot be modified without // destroying the cluster. remove_default_node_pool = true + // If removing the default node pool, initial_node_count should be at least 1. + initial_node_count = (var.initial_node_count == 0) ? 1 : var.initial_node_count node_pools = var.node_pools node_pools_labels = var.node_pools_labels diff --git a/modules/safer-cluster/main.tf b/modules/safer-cluster/main.tf index b1b497f790..8bc07bce0b 100644 --- a/modules/safer-cluster/main.tf +++ b/modules/safer-cluster/main.tf @@ -73,11 +73,11 @@ module "gke" { maintenance_start_time = var.maintenance_start_time - initial_node_count = var.initial_node_count - // We suggest removing the default node pool, as it cannot be modified without // destroying the cluster. remove_default_node_pool = true + // If removing the default node pool, initial_node_count should be at least 1. + initial_node_count = (var.initial_node_count == 0) ? 1 : var.initial_node_count node_pools = var.node_pools node_pools_labels = var.node_pools_labels