Skip to content

Instantly share code, notes, and snippets.

@negabaro
Created February 16, 2018 16:30
Show Gist options
  • Save negabaro/1f174007e4cdee8026380fb0b0872b6f to your computer and use it in GitHub Desktop.
Save negabaro/1f174007e4cdee8026380fb0b0872b6f to your computer and use it in GitHub Desktop.
resource "aws_eip" "example" {
count = "${var.create_eip}"
instance = "${aws_instance.example.id}"
}
resource "aws_route53_record" "example" {
count = "${1 - var.create_eip}"
zone_id = "A1B2CDEF3GH4IJ"
name = "foo.example.com"
type = "A"
ttl = 300
records = ["${aws_instance.example.public_ip}"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment