Skip to content

Instantly share code, notes, and snippets.

@MattSurabian
Created June 22, 2016 14:14
Show Gist options
  • Save MattSurabian/64f310803c12f1686719bf50cf1f2d51 to your computer and use it in GitHub Desktop.
Save MattSurabian/64f310803c12f1686719bf50cf1f2d51 to your computer and use it in GitHub Desktop.
resource "aws_route53_record" "domain-com_A_consul-domain-com" {
zone_id = "${var.domain_zone_id}"
type = "A"
name = "consul"
ttl = "1"
records = ["${aws_instance.host.0.public_ip}", "${aws_instance.host.1.public_ip}", "${aws_instance.host.2.public_ip}"]
}
// or
resource "aws_route53_record" "domain-com_A_consul-domain-com" {
count = "${var.cluster_size}"
zone_id = "${var.domain_zone_id}"
type = "A"
name = "consul"
ttl = "1"
records = ["${concat("aws_instance.api.", count.index, ".public_ip")}"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment