From 179a8ecd241690215253ec860ca041b7b3781e9e Mon Sep 17 00:00:00 2001 From: Will Yardley Date: Wed, 30 Oct 2024 13:44:05 -0700 Subject: [PATCH] refactor: remove unnecessary lookup for safer_cluster nodepool ID (#2160) --- autogen/main/cluster.tf.tmpl | 2 +- modules/beta-private-cluster-update-variant/cluster.tf | 2 +- modules/beta-public-cluster-update-variant/cluster.tf | 2 +- modules/private-cluster-update-variant/cluster.tf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index 8934aa2fc2..b3dffb490d 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -753,7 +753,7 @@ locals { resource "random_id" "name" { for_each = merge(local.node_pools, local.windows_node_pools) byte_length = 2 - prefix = format("%s-", lookup(each.value, "name")) + prefix = "${each.key}-" keepers = merge( zipmap( local.force_node_pool_recreation_resources, diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index 43de029990..af766203d9 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -647,7 +647,7 @@ locals { resource "random_id" "name" { for_each = merge(local.node_pools, local.windows_node_pools) byte_length = 2 - prefix = format("%s-", lookup(each.value, "name")) + prefix = "${each.key}-" keepers = merge( zipmap( local.force_node_pool_recreation_resources, diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index dcb65a0192..708a350f4d 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -626,7 +626,7 @@ locals { resource "random_id" "name" { for_each = merge(local.node_pools, local.windows_node_pools) byte_length = 2 - prefix = format("%s-", lookup(each.value, "name")) + prefix = "${each.key}-" keepers = merge( zipmap( local.force_node_pool_recreation_resources, diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index 99704aa14d..d783db4227 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -588,7 +588,7 @@ locals { resource "random_id" "name" { for_each = merge(local.node_pools, local.windows_node_pools) byte_length = 2 - prefix = format("%s-", lookup(each.value, "name")) + prefix = "${each.key}-" keepers = merge( zipmap( local.force_node_pool_recreation_resources,