Skip to content

Commit

Permalink
re-wrote record to correctly use alias record type
Browse files Browse the repository at this point in the history
  • Loading branch information
dms1981 committed Aug 21, 2023
1 parent 27f694e commit 15f563f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions terraform/environments/data-and-insights-wepi/redshift.tf
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,13 @@ resource "aws_lb_target_group_attachment" "redshift-data" {

resource "aws_route53_record" "redshift-lb-dns" {
provider = aws.core-vpc
name = format("redshift.%s", data.aws_route53_zone.inner.name)
records = [aws_lb.redshift-data.dns_name]
type = "CNAME"
zone_id = data.aws_route53_zone.inner.zone_id
}
name = format("redshift.%s", data.aws_route53_zone.inner.name)
type = "A"
zone_id = data.aws_route53_zone.inner.zone_id

alias {
name = aws_lb.redshift-data.dns_name
zone_id = aws_lb.redshift-data.zone_id
evaluate_target_health = true
}
}

0 comments on commit 15f563f

Please sign in to comment.