From 7c5f1d8a120957dea9c46cdef4e724f58e0f0058 Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Fri, 2 Aug 2024 20:32:42 -0400 Subject: [PATCH] support reservation affinity --- autogen/main/cluster.tf.tmpl | 2 +- cluster.tf | 4 ++-- modules/beta-private-cluster-update-variant/cluster.tf | 4 ++-- modules/beta-private-cluster/cluster.tf | 4 ++-- modules/beta-public-cluster-update-variant/cluster.tf | 4 ++-- modules/beta-public-cluster/cluster.tf | 4 ++-- modules/private-cluster-update-variant/cluster.tf | 4 ++-- modules/private-cluster/cluster.tf | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index af07b49747..7ee6b63e72 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -890,7 +890,7 @@ resource "google_container_node_pool" "windows_pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( diff --git a/cluster.tf b/cluster.tf index b6e052b7a6..c23e39a7bc 100644 --- a/cluster.tf +++ b/cluster.tf @@ -600,7 +600,7 @@ resource "google_container_node_pool" "pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( @@ -883,7 +883,7 @@ resource "google_container_node_pool" "windows_pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index 05362b4768..d32df0d405 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -768,7 +768,7 @@ resource "google_container_node_pool" "pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( @@ -1065,7 +1065,7 @@ resource "google_container_node_pool" "windows_pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index 65cfc3e9b1..4b704d389b 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -685,7 +685,7 @@ resource "google_container_node_pool" "pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( @@ -981,7 +981,7 @@ resource "google_container_node_pool" "windows_pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index 7472c11f2b..c6fffab89b 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -747,7 +747,7 @@ resource "google_container_node_pool" "pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( @@ -1044,7 +1044,7 @@ resource "google_container_node_pool" "windows_pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index 05901f4a78..470a6ec8d4 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -664,7 +664,7 @@ resource "google_container_node_pool" "pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( @@ -960,7 +960,7 @@ resource "google_container_node_pool" "windows_pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index 9adcd40f5a..b1d010769a 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -704,7 +704,7 @@ resource "google_container_node_pool" "pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( @@ -988,7 +988,7 @@ resource "google_container_node_pool" "windows_pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index e01a978dbc..304e5767a8 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -621,7 +621,7 @@ resource "google_container_node_pool" "pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge( @@ -904,7 +904,7 @@ resource "google_container_node_pool" "windows_pools" { content { consume_reservation_type = reservation_affinity.value.consume_reservation_type key = reservation_affinity.value.key - values = split(",", reservation_affinity.value.values) + values = reservation_affinity.value.values == null ? null : split(",", reservation_affinity.value.values) } } labels = merge(