Created
March 19, 2018 15:18
-
-
Save santiagopoli/11b1137d1bd8011799cb88cf46e8b4f4 to your computer and use it in GitHub Desktop.
Terraform Blue Green / (Optional) DNS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "aws_route53_zone" "terraform-blue-green" { | |
name = "yourdomain.com." | |
} | |
resource "aws_route53_record" "terraform-blue-green" { | |
zone_id = "${data.aws_route53_zone.terraform-blue-green.zone_id}" | |
name = "v${var.infrastructure_version}.yourdomain.com" | |
type = "A" | |
alias { | |
name = "dualstack.${aws_elb.terraform-blue-green.dns_name}" | |
zone_id = "${aws_elb.terraform-blue-green.zone_id}" | |
evaluate_target_health = false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment