Skip to content

Instantly share code, notes, and snippets.

@simontabor
Last active June 4, 2019 09:00
Show Gist options
  • Save simontabor/f244bb70b801f72cf3390066811d337d to your computer and use it in GitHub Desktop.
Save simontabor/f244bb70b801f72cf3390066811d337d to your computer and use it in GitHub Desktop.
resource "aws_route53_record" "latency-use1" {
zone_id = "${data.aws_route53_zone.my_zone.zone_id}"
name = "my-application"
type = "A"
set_identifier = "service-us-east-1"
alias {
zone_id = "${aws_lb.main_us_east_1.zone_id}"
name = "${aws_lb.main_us_east_1.dns_name}"
evaluate_target_health = true
}
latency_routing_policy {
region = "us-east-1"
}
}
resource "aws_route53_record" "latency-euc1" {
zone_id = "${data.aws_route53_zone.my_zone.zone_id}"
name = "my-application"
type = "A"
set_identifier = "service-eu-central-1"
alias {
zone_id = "${aws_lb.main_eu_central_1.zone_id}"
name = "${aws_lb.main_eu_central_1.dns_name}"
evaluate_target_health = true
}
latency_routing_policy {
region = "eu-central-1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment