resource "helm_release" "cert_manager" {
  name             = "cert-manager"
  chart            = "https://charts.jetstack.io/charts/cert-manager-v${var.chart_version}.tgz"
  namespace        = var.namespace
  create_namespace = true
  wait             = true

  set = [{
    name  = "installCRDs"
    value = "true"
  },
  {
    name  = "email"
    value = var.email
  }]

  set_list = [{
    name = "dnsConfig.nameservers"
    value = ["1.1.1.1", "8.8.8.8"]
  }]
}


output "installed" {
  value = true
  depends_on = [helm_release.cert_manager]
}
