From 1a6a4dc89e4a37d7bd61598ee4bd0aeaf90eaf0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Heleno?= Date: Fri, 10 Nov 2023 13:47:31 +0100 Subject: [PATCH] fix: remove the need to set the Let's Encrypt e-mail when self-signed --- aks/extra_variables.tf | 5 +++++ aks/main.tf | 2 +- eks/extra_variables.tf | 5 +++++ eks/main.tf | 2 +- locals.tf | 4 ++-- scaleway/extra_variables.tf | 5 ++++- scaleway/main.tf | 2 +- self-signed/main.tf | 2 +- sks/extra_variables.tf | 4 ++++ sks/main.tf | 2 +- variables.tf | 4 ++-- 11 files changed, 27 insertions(+), 10 deletions(-) diff --git a/aks/extra_variables.tf b/aks/extra_variables.tf index bafe7c8..782b267 100644 --- a/aks/extra_variables.tf +++ b/aks/extra_variables.tf @@ -22,3 +22,8 @@ variable "cluster_oidc_issuer_url" { description = "The OIDC issuer URL that is associated with the cluster." type = string } + +variable "letsencrypt_issuer_email" { + description = "E-mail address used to register with Let's Encrypt." + type = string +} diff --git a/aks/main.tf b/aks/main.tf index ad04693..27abacd 100644 --- a/aks/main.tf +++ b/aks/main.tf @@ -46,7 +46,7 @@ module "cert-manager" { helm_values = concat(local.helm_values, var.helm_values) - letsencrypt_issuer_email = var.letsencrypt_issuer_email + letsencrypt_issuer_email_main = var.letsencrypt_issuer_email dependency_ids = var.dependency_ids } diff --git a/eks/extra_variables.tf b/eks/extra_variables.tf index 9447905..23ed6e5 100644 --- a/eks/extra_variables.tf +++ b/eks/extra_variables.tf @@ -17,3 +17,8 @@ variable "other_domains" { type = list(string) default = [] } + +variable "letsencrypt_issuer_email" { + description = "E-mail address used to register with Let's Encrypt." + type = string +} diff --git a/eks/main.tf b/eks/main.tf index ee71f1a..d385169 100644 --- a/eks/main.tf +++ b/eks/main.tf @@ -87,7 +87,7 @@ module "cert-manager" { helm_values = concat(local.helm_values, var.helm_values) - letsencrypt_issuer_email = var.letsencrypt_issuer_email + letsencrypt_issuer_email_main = var.letsencrypt_issuer_email dependency_ids = var.dependency_ids } diff --git a/locals.tf b/locals.tf index 91b9832..4eadb61 100644 --- a/locals.tf +++ b/locals.tf @@ -9,12 +9,12 @@ locals { letsencrypt = { production = { name = "letsencrypt-prod" - email = var.letsencrypt_issuer_email + email = var.letsencrypt_issuer_email_main server = "https://acme-v02.api.letsencrypt.org/directory" } staging = { name = "letsencrypt-staging" - email = var.letsencrypt_issuer_email + email = var.letsencrypt_issuer_email_main server = "https://acme-staging-v02.api.letsencrypt.org/directory" } } diff --git a/scaleway/extra_variables.tf b/scaleway/extra_variables.tf index 8b13789..49b9db3 100644 --- a/scaleway/extra_variables.tf +++ b/scaleway/extra_variables.tf @@ -1 +1,4 @@ - +variable "letsencrypt_issuer_email" { + description = "E-mail address used to register with Let's Encrypt." + type = string +} diff --git a/scaleway/main.tf b/scaleway/main.tf index 895b33a..fc95e3d 100644 --- a/scaleway/main.tf +++ b/scaleway/main.tf @@ -13,7 +13,7 @@ module "cert-manager" { helm_values = concat(local.helm_values, var.helm_values) - letsencrypt_issuer_email = var.letsencrypt_issuer_email + letsencrypt_issuer_email_main = var.letsencrypt_issuer_email dependency_ids = var.dependency_ids } diff --git a/self-signed/main.tf b/self-signed/main.tf index 8dfee3d..d35511e 100644 --- a/self-signed/main.tf +++ b/self-signed/main.tf @@ -35,7 +35,7 @@ module "cert-manager" { helm_values = concat(local.helm_values, var.helm_values) - letsencrypt_issuer_email = var.letsencrypt_issuer_email + letsencrypt_issuer_email_main = null dependency_ids = var.dependency_ids } diff --git a/sks/extra_variables.tf b/sks/extra_variables.tf index e69de29..49b9db3 100644 --- a/sks/extra_variables.tf +++ b/sks/extra_variables.tf @@ -0,0 +1,4 @@ +variable "letsencrypt_issuer_email" { + description = "E-mail address used to register with Let's Encrypt." + type = string +} diff --git a/sks/main.tf b/sks/main.tf index 7208af7..db29762 100644 --- a/sks/main.tf +++ b/sks/main.tf @@ -13,7 +13,7 @@ module "cert-manager" { helm_values = concat(local.helm_values, var.helm_values) - letsencrypt_issuer_email = var.letsencrypt_issuer_email + letsencrypt_issuer_email_main = var.letsencrypt_issuer_email dependency_ids = var.dependency_ids } diff --git a/variables.tf b/variables.tf index c50dc8f..c64a8d7 100644 --- a/variables.tf +++ b/variables.tf @@ -80,8 +80,8 @@ variable "dependency_ids" { ## Module variables ####################### -variable "letsencrypt_issuer_email" { - description = "Email address used to register with Let's Encrypt." +variable "letsencrypt_issuer_email_main" { + description = "E-mail address used to register with Let's Encrypt." type = string }