-
Notifications
You must be signed in to change notification settings - Fork 0
/
route53.tf
25 lines (22 loc) · 933 Bytes
/
route53.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// CREATE INTERNAL ALB DNS ALIAS
resource "aws_route53_record" "internal_route53_record" {
zone_id = "${data.terraform_remote_state.account.primary_zone_id}"
name = "${aws_ecs_cluster.ecs_cluster.name}-internal.${data.terraform_remote_state.account.domain_name}."
type = "A"
alias {
name = "${aws_alb.internal_alb.dns_name}"
zone_id = "${aws_alb.internal_alb.zone_id}"
evaluate_target_health = false
}
}
// CREATE EXTERNAL ALB DNS ALIAS
resource "aws_route53_record" "external_route53_record" {
zone_id = "${data.terraform_remote_state.account.primary_zone_id}"
name = "${aws_ecs_cluster.ecs_cluster.name}-external.${data.terraform_remote_state.account.domain_name}."
type = "A"
alias {
name = "${aws_alb.external_alb.dns_name}"
zone_id = "${aws_alb.external_alb.zone_id}"
evaluate_target_health = false
}
}