Skip to content

Commit

Permalink
Merge pull request #5 from SCT-Engineering/feature-terragrunty
Browse files Browse the repository at this point in the history
Change istio LB from data_source to variable
  • Loading branch information
morga471 committed Oct 16, 2024
2 parents ca6c6dd + 805e570 commit a0417f4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
13 changes: 0 additions & 13 deletions aws_data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,3 @@ data "aws_vpc" "dummy_vpc" {
values = ["vpc0-dummy"]
}
}

data "kubernetes_service" "istio_ingressgateway" {
depends_on = [aws_route53_zone.cluster_domain]
metadata {
name = "istio-ingressgateway"
namespace = var.istio_namespace
}
}

data "aws_lb" "lb" {
depends_on = [aws_route53_zone.cluster_domain]
name = split("-", data.kubernetes_service.istio_ingressgateway.status[0].load_balancer[0].ingress[0].hostname)[0]
}
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,6 @@ module "cname_cluster_domain" {
source = "git@github.e.it.census.gov:terraform-modules/aws-dns//cname"

name = format("%v.%v", "*", local.cluster_domain_name)
values = data.aws_lb.lb.dns_name
values = var.istio_ingress_lb
zone = aws_route53_zone.cluster_domain.zone_id
}
5 changes: 2 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ variable "os_username" {
# DNS variables
###################################################################

variable "istio_namespace" {
description = "The namespace to install the istio components. Defaults to 'istio-system'"
variable "istio_ingress_lb" {
description = "The istio ingress load balancer DNS."
type = string
default = "istio-system"
}

variable "region_map" {
Expand Down

0 comments on commit a0417f4

Please sign in to comment.