Skip to content

Commit

Permalink
Refactor SSL configuration and add cert-manager module
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlahbib committed Nov 17, 2024
1 parent a7ff8a6 commit fde4c00
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions terraform/tls.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@ resource "kubernetes_namespace" "cert_manager" {
}
}

resource "helm_release" "cert_manager" {
name = "cert-manager"
repository = "https://charts.jetstack.io"
chart = "cert-manager"
version = "v1.12.3"
namespace = kubernetes_namespace.cert_manager.metadata.0.name

set {
name = "installCRDs"
value = "true"
}
module "cert_manager" {
source = "terraform-iaac/cert-manager/kubernetes"
cluster_issuer_email = var.CLOUDFLARE_EMAIL
cluster_issuer_name = "letsencrypt-prod"
cluster_issuer_private_key_secret_name = "letsencrypt-prod-key"
}


Expand Down Expand Up @@ -49,5 +44,5 @@ resource "kubernetes_manifest" "cluster_issuer" {
}
}
}
depends_on = [helm_release.cert_manager]
depends_on = [module.cert_manager]
}

0 comments on commit fde4c00

Please sign in to comment.