Skip to content

Commit

Permalink
fix: set initial_node_count with remove_default_node_pool (terraform-…
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody authored Apr 18, 2022
1 parent c532455 commit 8ab9d56
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions autogen/safer-cluster/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions modules/safer-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions modules/safer-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ab9d56

Please sign in to comment.