From dbd90e3e556d74881fb3132457a9159d7fb81e6b Mon Sep 17 00:00:00 2001 From: florianMalbranque <82934052+florianMalbranque@users.noreply.github.com> Date: Tue, 14 May 2024 19:45:57 +0200 Subject: [PATCH] fix: local nvme ssd count (#1937) --- 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 f39637ce3c..e09755281c 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -850,7 +850,7 @@ resource "google_container_node_pool" "windows_pools" { {% endif %} dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } diff --git a/cluster.tf b/cluster.tf index 50a049496d..e945124d1a 100644 --- a/cluster.tf +++ b/cluster.tf @@ -568,7 +568,7 @@ resource "google_container_node_pool" "pools" { dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } @@ -784,7 +784,7 @@ resource "google_container_node_pool" "windows_pools" { dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index ef9ba2b92e..d2adf527b0 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -734,7 +734,7 @@ resource "google_container_node_pool" "pools" { } dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } @@ -976,7 +976,7 @@ resource "google_container_node_pool" "windows_pools" { } dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index 7610189c68..22ca1b7823 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -659,7 +659,7 @@ resource "google_container_node_pool" "pools" { } dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } @@ -900,7 +900,7 @@ resource "google_container_node_pool" "windows_pools" { } dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index 363664a8a8..2d7b25218e 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -715,7 +715,7 @@ resource "google_container_node_pool" "pools" { } dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } @@ -957,7 +957,7 @@ resource "google_container_node_pool" "windows_pools" { } dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index 3c4f6e7337..b634e2a418 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -640,7 +640,7 @@ resource "google_container_node_pool" "pools" { } dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } @@ -881,7 +881,7 @@ resource "google_container_node_pool" "windows_pools" { } dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index badf7356be..51447d8df2 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -662,7 +662,7 @@ resource "google_container_node_pool" "pools" { dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } @@ -879,7 +879,7 @@ resource "google_container_node_pool" "windows_pools" { dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index 59f5ecaf73..ff09024061 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -587,7 +587,7 @@ resource "google_container_node_pool" "pools" { dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value } @@ -803,7 +803,7 @@ resource "google_container_node_pool" "windows_pools" { dynamic "local_nvme_ssd_block_config" { - for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [1] : [] + for_each = lookup(each.value, "local_nvme_ssd_count", 0) > 0 ? [each.value.local_nvme_ssd_count] : [] content { local_ssd_count = local_nvme_ssd_block_config.value }