From 50dae4549f16d162d8d2c639e1405fc4dd8bbdd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Steinh=C3=A4user?= <42437185+leonsteinhaeuser@users.noreply.github.com> Date: Thu, 2 Nov 2023 10:55:46 +0100 Subject: [PATCH] fix: reference to cluster name (#12) Signed-off-by: leonsteinhaeuser --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index f2954b7..710317a 100644 --- a/main.tf +++ b/main.tf @@ -63,7 +63,7 @@ resource "argocd_application_set" "this" { "application-set" = var.name }, { - for k, v in var.env_context_annotations : k => "{{ $applicationName := \"${var.name}\" }}{{ $resourceName := \"${local.resource_name}\" }}{{ $cluster := \"\" }}{{ if eq (index .Path.Segments 1) \"general-purpose\" }}{{ $cluster = \"in-cluster\" }}{{ else }}{{ $cluster = (index .Path.Segments 1) }}{{ end }}${v}" + for k, v in var.env_context_annotations : k => "{{ $applicationName := \"${var.name}\" }}{{ $resourceName := \"${local.resource_name}\" }}{{ $cluster := \"\" }}{{ if eq ${local.cluster_identifier} \"general-purpose\" }}{{ $cluster = \"in-cluster\" }}{{ else }}{{ $cluster = ${local.cluster_identifier} }}{{ end }}${v}" } ) labels = merge(