From 5a4111922dbdd5d00749853eaea1cbf3fad65760 Mon Sep 17 00:00:00 2001 From: MrwanBaghdad Date: Wed, 15 Jun 2022 17:18:10 +0200 Subject: [PATCH] feat: source node pools' auto_upgrade configuration from the GKE cluster default_auto_upgrade --- autogen/main/cluster.tf.tmpl | 2 +- cluster.tf | 2 +- modules/beta-private-cluster-update-variant/cluster.tf | 2 +- modules/beta-private-cluster/cluster.tf | 2 +- modules/beta-public-cluster-update-variant/cluster.tf | 2 +- modules/beta-public-cluster/cluster.tf | 2 +- modules/private-cluster-update-variant/cluster.tf | 2 +- modules/private-cluster/cluster.tf | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index 92c42822e7..22a6880563 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -530,7 +530,7 @@ resource "google_container_node_pool" "pools" { cluster = google_container_cluster.primary.name - version = lookup(each.value, "auto_upgrade", false) ? "" : lookup( + version = lookup(each.value, "auto_upgrade", local.default_auto_upgrade) ? "" : lookup( each.value, "version", google_container_cluster.primary.min_master_version, diff --git a/cluster.tf b/cluster.tf index 61518b6da6..72c7cebf5b 100644 --- a/cluster.tf +++ b/cluster.tf @@ -259,7 +259,7 @@ resource "google_container_node_pool" "pools" { cluster = google_container_cluster.primary.name - version = lookup(each.value, "auto_upgrade", false) ? "" : lookup( + version = lookup(each.value, "auto_upgrade", local.default_auto_upgrade) ? "" : lookup( each.value, "version", google_container_cluster.primary.min_master_version, diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index ba4480c444..b6a86ee052 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -465,7 +465,7 @@ resource "google_container_node_pool" "pools" { cluster = google_container_cluster.primary.name - version = lookup(each.value, "auto_upgrade", false) ? "" : lookup( + version = lookup(each.value, "auto_upgrade", local.default_auto_upgrade) ? "" : lookup( each.value, "version", google_container_cluster.primary.min_master_version, diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index 31448a1df0..564a2efa8c 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -377,7 +377,7 @@ resource "google_container_node_pool" "pools" { cluster = google_container_cluster.primary.name - version = lookup(each.value, "auto_upgrade", false) ? "" : lookup( + version = lookup(each.value, "auto_upgrade", local.default_auto_upgrade) ? "" : lookup( each.value, "version", google_container_cluster.primary.min_master_version, diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index 8058338a49..5687d0e661 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -446,7 +446,7 @@ resource "google_container_node_pool" "pools" { cluster = google_container_cluster.primary.name - version = lookup(each.value, "auto_upgrade", false) ? "" : lookup( + version = lookup(each.value, "auto_upgrade", local.default_auto_upgrade) ? "" : lookup( each.value, "version", google_container_cluster.primary.min_master_version, diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index 46450cbf46..1708c1e43b 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -358,7 +358,7 @@ resource "google_container_node_pool" "pools" { cluster = google_container_cluster.primary.name - version = lookup(each.value, "auto_upgrade", false) ? "" : lookup( + version = lookup(each.value, "auto_upgrade", local.default_auto_upgrade) ? "" : lookup( each.value, "version", google_container_cluster.primary.min_master_version, diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index 588a200b63..9945792aa4 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -359,7 +359,7 @@ resource "google_container_node_pool" "pools" { cluster = google_container_cluster.primary.name - version = lookup(each.value, "auto_upgrade", false) ? "" : lookup( + version = lookup(each.value, "auto_upgrade", local.default_auto_upgrade) ? "" : lookup( each.value, "version", google_container_cluster.primary.min_master_version, diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index 6a222bc9bf..18463f3223 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -272,7 +272,7 @@ resource "google_container_node_pool" "pools" { cluster = google_container_cluster.primary.name - version = lookup(each.value, "auto_upgrade", false) ? "" : lookup( + version = lookup(each.value, "auto_upgrade", local.default_auto_upgrade) ? "" : lookup( each.value, "version", google_container_cluster.primary.min_master_version,