diff --git a/aws_data.tf b/aws_data.tf new file mode 100644 index 0000000..4df77ed --- /dev/null +++ b/aws_data.tf @@ -0,0 +1,12 @@ +data "kubernetes_service" "istio_ingressgateway" { + depends_on = [helm_release.ingress] + metadata { + name = "istio-ingressgateway" + namespace = var.namespace + } +} + +data "aws_lb" "lb" { + depends_on = [helm_release.ingress] + name = split("-", data.kubernetes_service.istio_ingressgateway.status[0].load_balancer[0].ingress[0].hostname)[0] +} \ No newline at end of file diff --git a/outputs.tf b/outputs.tf index 4b17f45..6596549 100644 --- a/outputs.tf +++ b/outputs.tf @@ -12,7 +12,7 @@ output "module_version" { value = local.module_version } -output "istio_namespace" { - description = "The namespace used by istio." - value = kubernetes_namespace.ns.metadata[0].name +output "istio_ingress_lb" { + description = "The istio ingress load balancer DNS." + value = data.aws_lb.lb.dns_name }