From ee53f8ebf9273b39b30b2930e358d13c92b89074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aimee=20Wei=C3=9F?= Date: Mon, 18 Dec 2023 16:28:27 +0100 Subject: [PATCH] fix name to not have -- --- modules/ionos-k8s-cluster/main.tf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ionos-k8s-cluster/main.tf b/modules/ionos-k8s-cluster/main.tf index 8238ff1..f00bafd 100644 --- a/modules/ionos-k8s-cluster/main.tf +++ b/modules/ionos-k8s-cluster/main.tf @@ -119,7 +119,8 @@ resource "ionoscloud_k8s_node_pool" "nodepool_legacy" { resource "ionoscloud_ipblock" "ippools" { for_each = {for np in local.nodepool_per_zone_creator : "${np.availability_zone}-${np.purpose}-${np.nodepool_index}" => np if np.create_public_ip_pools == true} - name = lower("${local.cluster_name}-${replace(each.key, "_", "")}-nodepool") + name = lower("${local.cluster_name}-${replace(each.value.availability_zone, "_", "")}-nodepool-${each.value.nodepool_index}") + lower("${local.cluster_name}-${replace(each.value.availability_zone, "_", "")}-${length(each.value.purpose) > 0 ? "${each.value.purpose}-" : ""}nodepool-${each.value.nodepool_index}") location = var.datacenter_location size = each.value.auto_scaling ? each.value.max_node_count + 1 : each.value.node_count + 1 }