-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroute53.tf
More file actions
27 lines (23 loc) · 699 Bytes
/
Copy pathroute53.tf
File metadata and controls
27 lines (23 loc) · 699 Bytes
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
resource "aws_route53_zone" "myzone" {
name = "${var.domain_name}"
}
resource "aws_route53_record" "blue" {
zone_id = "${aws_route53_zone.myzone.zone_id}"
name = "blue.1.${var.domain_name}"
type = "A"
alias {
name = "${aws_alb.blue-lb.dns_name}"
zone_id = "${aws_alb.blue-lb.zone_id}"
evaluate_target_health = true
}
}
resource "aws_route53_record" "green" {
zone_id = "${aws_route53_zone.myzone.zone_id}"
name = "green.1.${var.domain_name}"
type = "A"
alias {
name = "${aws_alb.blue-lb.dns_name}"
zone_id = "${aws_alb.blue-lb.zone_id}"
evaluate_target_health = true
}
}