Skip to content

Commit

Permalink
chore: improved go template handling
Browse files Browse the repository at this point in the history
  • Loading branch information
leonsteinhaeuser committed Oct 27, 2023
1 parent cab088e commit 5de3826
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,7 @@ resource "argocd_application_set" "this" {
for k, v in var.env_context_annotations : k => <<EOF
{{- $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}
{{- $cluster := "" }}{{ if eq (index .Path.Segments 1) "general-purpose" }}{{ $cluster = "in-cluster" }}{{ else }}{{ $cluster = (index .Path.Segments 1) }}{{ end }}${v}
EOF
}
)
Expand Down

0 comments on commit 5de3826

Please sign in to comment.