<p>I'm trying to install Vault on a Kubernetes Cluster by running the Vault Helm chart out of Terraform. For some reason the ingress doesn't get created.
When I forward the pods port the ui comes up fine, so I assume everything is working, but the ingress not being available is tripping me up.
Edit: There are no errors while running terraform apply.
If there is another point where I should look, please tell me.
This is my helm_release resource:</p>
<pre><code>  name       = &quot;vault&quot;
  repository = &quot;https://helm.releases.hashicorp.com&quot;
  chart      = &quot;vault&quot;

  namespace        = &quot;vault&quot;
  create_namespace = true

  set {
    name  = &quot;ui.enabled&quot;
    value = &quot;true&quot;
  }

  #Set ingress up to use cert-manager provided secret
  set {
    name  = &quot;ingress.enabled&quot;
    value = &quot;true&quot;
  }

  set {
    name  = &quot;ingress.annotations.cert-manager\\.io/cluster-issuer&quot;
    value = &quot;letsencrypt-cluster-prod&quot;
  }

  set {
    name  = &quot;ingress.annotations.kubernetes\\.io/ingress\\.class&quot;
    value = &quot;nginx&quot;
  }

  set {
    name  = &quot;ingress.tls[0].hosts[0]&quot;
    value = var.vault_hostname
  }

  set {
    name  = &quot;ingress.hosts[0].host&quot;
    value = var.vault_hostname
  }

  set {
    name  = &quot;ingress.hosts[0].paths[0]&quot;
    value = &quot;/&quot;
  }
}
</code></pre>
<p>I'm relatively new to all of these techs, having worked with puppet before, so if someone could point me in the right direction, I'd be much obliged.</p>

eviscares
<p>I achieved enabling ingress with a local variable, here is the working example</p>
<pre><code>locals {
  values = {
    server = {
      ingress = {
        enabled = var.server_enabled
        labels = {
          traffic = &quot;external&quot;
        }
        ingressClassName = &quot;nginx&quot;
        annotations = {
          &quot;kubernetes.io/tls-acme&quot;                   = &quot;true&quot;
          &quot;nginx.ingress.kubernetes.io/ssl-redirect&quot; = &quot;true&quot;
        }
        hosts = [{
          host  = vault.example.com
          paths = [&quot;/&quot;]
        }]
        tls = [
          {
            secretName = vault-tls-secret
            hosts      = [&quot;vault.example.com&quot;]
          }
        ]
      }
    }
  }
}

resource &quot;helm_release&quot; &quot;vault&quot; {
  name             = &quot;vault&quot;
  namespace        = &quot;vault&quot;
  repository       = &quot;https://helm.releases.hashicorp.com&quot;
  chart            = &quot;vault&quot;
  version          = &quot;0.19.0&quot;
  create_namespace = true

  # other values to set
  #set { 
  #  name = &quot;server.ha.enabled&quot;
  #  value = &quot;true&quot;
  #}

  values = [
    yamlencode(local.values)
  ]
}
</code></pre>
