From 06a180d22d4569f0eac9d4818c6afc868b6e3e08 Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Fri, 2 Jun 2023 16:09:24 +0200 Subject: [PATCH] fix: mount ca cert also for letsencrypt-staging and parameterize secret key (#49) * fix: mount ca cert also for letsencrypt-staging and parameterize secret key * docs(terraform-docs): generate docs and write to README.adoc * docs(terraform-docs): generate docs and write to README.adoc * feat: replace ssl_secret_key variable by condition * docs(terraform-docs): generate docs and write to README.adoc --------- Co-authored-by: hbollon --- README.adoc | 6 +++--- locals.tf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.adoc b/README.adoc index 3dc4e29a..e72fb95c 100644 --- a/README.adoc +++ b/README.adoc @@ -205,6 +205,8 @@ The following requirements are needed by this module: The following providers are used by this module: +- [[provider_null]] <> (>= 3) + - [[provider_jwt]] <> (>= 1.1) - [[provider_time]] <> (>= 0.9) @@ -215,8 +217,6 @@ The following providers are used by this module: - [[provider_argocd]] <> (>= 4.2) -- [[provider_null]] <> (>= 3) - === Resources The following resources are used by this module: @@ -413,12 +413,12 @@ Description: Map of extra accounts and their tokens. [cols="a,a",options="header,autowidth"] |=== |Name |Version +|[[provider_null]] <> |>= 3 |[[provider_jwt]] <> |>= 1.1 |[[provider_time]] <> |>= 0.9 |[[provider_random]] <> |>= 3 |[[provider_utils]] <> |>= 1.6 |[[provider_argocd]] <> |>= 4.2 -|[[provider_null]] <> |>= 3 |=== = Resources diff --git a/locals.tf b/locals.tf index f40c42c4..5907261c 100644 --- a/locals.tf +++ b/locals.tf @@ -177,12 +177,12 @@ locals { enabled = true } }, - var.cluster_issuer == "ca-issuer" ? { + var.cluster_issuer == "ca-issuer" || var.cluster_issuer == "letsencrypt-staging" ? { volumeMounts = [ { name = "certificate" - mountPath = "/etc/ssl/certs/ca.crt" - subPath = "ca.crt" + mountPath = format("/etc/ssl/certs/%s", var.cluster_issuer == "letsencrypt-staging" ? "tls.crt" : "ca.crt") + subPath = var.cluster_issuer == "letsencrypt-staging" ? "tls.crt" : "ca.crt" }, ] volumes = [