Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Terraform outputs of "helm_release" resource

It is possible to export as an output a specific helm value that is not provisioned by Terraform? For example, I created nginx ingress controller with Helm via terraform and I want to export the external IP of it. (The ip isn't created via terraform, this is an internal ip).

Thanks!

like image 538
Tomer Aharon Avatar asked Nov 02 '25 03:11

Tomer Aharon


1 Answers

you can use the data block in terraform to get outputs from existing resources, you can read more about that in the docs.

in your case, you can do something like this:

data "kubernetes_service" "ingress_svc" {
  metadata {
    name = "ingress_svc"
  }
}

output "instance_ip_addr" {
  value = data.kubernetes_service.ingress_svc.status.0.load_balancer.0.ingress[0].ip
}

you can read more about that in the Kubernetes provider docs

like image 112
Mendi Neymark Avatar answered Nov 04 '25 19:11

Mendi Neymark



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!