From e987c9e1e295644f2ed3c1088ddec6862eade82d Mon Sep 17 00:00:00 2001 From: Paul Rudnitskiy Date: Tue, 7 Nov 2023 17:29:56 +0100 Subject: [PATCH] fix: alpha option for cluster creation --- autogen/main/cluster.tf.tmpl | 5 +++++ cluster.tf | 5 +++++ modules/beta-private-cluster-update-variant/cluster.tf | 5 +++++ modules/beta-private-cluster/cluster.tf | 5 +++++ modules/beta-public-cluster-update-variant/cluster.tf | 5 +++++ modules/beta-public-cluster/cluster.tf | 5 +++++ modules/private-cluster-update-variant/cluster.tf | 5 +++++ modules/private-cluster/cluster.tf | 5 +++++ 8 files changed, 40 insertions(+) diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index 4d36e19941..f518b9965f 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -419,6 +419,11 @@ resource "google_container_cluster" "primary" { name = "default-pool" initial_node_count = var.initial_node_count + management { + auto_repair = lookup(var.cluster_autoscaling, "auto_repair", true) + auto_upgrade = lookup(var.cluster_autoscaling, "auto_upgrade", true) + } + node_config { image_type = lookup(var.node_pools[0], "image_type", "COS_CONTAINERD") machine_type = lookup(var.node_pools[0], "machine_type", "e2-medium") diff --git a/cluster.tf b/cluster.tf index 2332cc8e26..22506d3623 100644 --- a/cluster.tf +++ b/cluster.tf @@ -290,6 +290,11 @@ resource "google_container_cluster" "primary" { name = "default-pool" initial_node_count = var.initial_node_count + management { + auto_repair = lookup(var.cluster_autoscaling, "auto_repair", true) + auto_upgrade = lookup(var.cluster_autoscaling, "auto_upgrade", true) + } + node_config { image_type = lookup(var.node_pools[0], "image_type", "COS_CONTAINERD") machine_type = lookup(var.node_pools[0], "machine_type", "e2-medium") diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index c07a41aa1c..210a44890f 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -348,6 +348,11 @@ resource "google_container_cluster" "primary" { name = "default-pool" initial_node_count = var.initial_node_count + management { + auto_repair = lookup(var.cluster_autoscaling, "auto_repair", true) + auto_upgrade = lookup(var.cluster_autoscaling, "auto_upgrade", true) + } + node_config { image_type = lookup(var.node_pools[0], "image_type", "COS_CONTAINERD") machine_type = lookup(var.node_pools[0], "machine_type", "e2-medium") diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index 830e70a93e..84dde643c4 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -348,6 +348,11 @@ resource "google_container_cluster" "primary" { name = "default-pool" initial_node_count = var.initial_node_count + management { + auto_repair = lookup(var.cluster_autoscaling, "auto_repair", true) + auto_upgrade = lookup(var.cluster_autoscaling, "auto_upgrade", true) + } + node_config { image_type = lookup(var.node_pools[0], "image_type", "COS_CONTAINERD") machine_type = lookup(var.node_pools[0], "machine_type", "e2-medium") diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index d0671e557f..3af1428a99 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -348,6 +348,11 @@ resource "google_container_cluster" "primary" { name = "default-pool" initial_node_count = var.initial_node_count + management { + auto_repair = lookup(var.cluster_autoscaling, "auto_repair", true) + auto_upgrade = lookup(var.cluster_autoscaling, "auto_upgrade", true) + } + node_config { image_type = lookup(var.node_pools[0], "image_type", "COS_CONTAINERD") machine_type = lookup(var.node_pools[0], "machine_type", "e2-medium") diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index f757f769df..8e379e9345 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -348,6 +348,11 @@ resource "google_container_cluster" "primary" { name = "default-pool" initial_node_count = var.initial_node_count + management { + auto_repair = lookup(var.cluster_autoscaling, "auto_repair", true) + auto_upgrade = lookup(var.cluster_autoscaling, "auto_upgrade", true) + } + node_config { image_type = lookup(var.node_pools[0], "image_type", "COS_CONTAINERD") machine_type = lookup(var.node_pools[0], "machine_type", "e2-medium") diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index aa9cd45ea9..f8e9f5b2a7 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -290,6 +290,11 @@ resource "google_container_cluster" "primary" { name = "default-pool" initial_node_count = var.initial_node_count + management { + auto_repair = lookup(var.cluster_autoscaling, "auto_repair", true) + auto_upgrade = lookup(var.cluster_autoscaling, "auto_upgrade", true) + } + node_config { image_type = lookup(var.node_pools[0], "image_type", "COS_CONTAINERD") machine_type = lookup(var.node_pools[0], "machine_type", "e2-medium") diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index f9c3266a6b..eee092ee7e 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -290,6 +290,11 @@ resource "google_container_cluster" "primary" { name = "default-pool" initial_node_count = var.initial_node_count + management { + auto_repair = lookup(var.cluster_autoscaling, "auto_repair", true) + auto_upgrade = lookup(var.cluster_autoscaling, "auto_upgrade", true) + } + node_config { image_type = lookup(var.node_pools[0], "image_type", "COS_CONTAINERD") machine_type = lookup(var.node_pools[0], "machine_type", "e2-medium")