Skip to content

Commit

Permalink
Create before destroy GKE Node Pool (#4)
Browse files Browse the repository at this point in the history
* Create before destroy GKE Node Pool

* updated art to nodepool name
  • Loading branch information
pk0331 committed Nov 9, 2022
1 parent a621332 commit d573e94
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ resource "google_container_cluster" "primary" {
resource "google_container_node_pool" "pools" {
provider = google
for_each = local.node_pools
name = each.key
# name = each.key
name_prefix = "${each.key}-art-"
project = var.project_id
location = local.location
// use node_locations if provided, defaults to cluster level node_locations if not specified
Expand Down Expand Up @@ -332,7 +333,7 @@ resource "google_container_node_pool" "pools" {

lifecycle {
ignore_changes = [initial_node_count]

create_before_destroy = true
}

timeouts {
Expand Down

0 comments on commit d573e94

Please sign in to comment.