Skip to content

Commit

Permalink
Gke create before destroy (#5)
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 authored Nov 9, 2022
1 parent c44c766 commit 92bde16
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 @@ -245,7 +245,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 @@ -373,7 +374,7 @@ resource "google_container_node_pool" "pools" {

lifecycle {
ignore_changes = [initial_node_count]

create_before_destroy = true
}

timeouts {
Expand Down

0 comments on commit 92bde16

Please sign in to comment.