forked from rcove/TGW
-
Notifications
You must be signed in to change notification settings - Fork 0
/
route53.tf
46 lines (39 loc) · 1.27 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
data "aws_route53_zone" "selected" {
name = "${var.r53zone}"
}
resource "aws_route53_record" "www" {
zone_id = "${data.aws_route53_zone.selected.zone_id}"
name = "${var.externaldnshost}.${var.r53zone}"
type = "A"
alias {
name = "${aws_lb.external_nlb.dns_name}"
zone_id = "${aws_lb.external_nlb.zone_id}"
evaluate_target_health = true
}
}
data "aws_route53_zone" "selectedapp" {
name = "${var.r53zone}"
}
resource "aws_route53_record" "app" {
zone_id = "${data.aws_route53_zone.selectedapp.zone_id}"
name = "${var.externaldnshostapp}.${var.r53zone}"
type = "A"
alias {
name = "${aws_lb.external_nlb2.dns_name}"
zone_id = "${aws_lb.external_nlb2.zone_id}"
evaluate_target_health = true
}
}
data "aws_route53_zone" "selectedalb" {
name = "${var.r53zone}"
}
resource "aws_route53_record" "alb" {
zone_id = "${data.aws_route53_zone.selectedapp.zone_id}"
name = "${var.externaldnshostalb}.${var.r53zone}"
type = "A"
alias {
name = "${aws_lb.external_alb.dns_name}"
zone_id = "${aws_lb.external_alb.zone_id}"
evaluate_target_health = true
}
}