-
Notifications
You must be signed in to change notification settings - Fork 1
/
dns.tf
39 lines (33 loc) · 1.03 KB
/
dns.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
data "aws_route53_zone" "selected" {
name = "${var.public_domain}"
}
resource "aws_route53_record" "publicrouter" {
zone_id = "${data.aws_route53_zone.selected.zone_id}"
name = "${local.dns_public_router}"
type = "A"
alias {
name = "${aws_elb.infra.dns_name}"
zone_id = "${aws_elb.infra.zone_id}"
evaluate_target_health = false
}
}
resource "aws_route53_record" "master" {
zone_id = "${data.aws_route53_zone.selected.zone_id}"
name = "${local.dns_master}"
type = "A"
alias {
name = "${aws_elb.master.dns_name}"
zone_id = "${aws_elb.master.zone_id}"
evaluate_target_health = false
}
}
resource "aws_route53_record" "internal_master" {
zone_id = "${data.aws_route53_zone.selected.zone_id}"
name = "${local.dns_master_internal}"
type = "A"
alias {
name = "${aws_elb.internal_master.dns_name}"
zone_id = "${aws_elb.master.zone_id}"
evaluate_target_health = false
}
}