Skip to content

Instantly share code, notes, and snippets.

@caquino
Created September 8, 2016 12:57
Show Gist options
  • Select an option

  • Save caquino/759acac1cf6ed01ea1a8eea11e047ba9 to your computer and use it in GitHub Desktop.

Select an option

Save caquino/759acac1cf6ed01ea1a8eea11e047ba9 to your computer and use it in GitHub Desktop.
variable "is_defined" {
type = "map"
default = {
"0" = "1"
}
}
resource "aws_route53_zone" "main" {
count = "${lookup(var.is_defined,length(var.zone_id),0)}"
name = "${var.name}"
vpc_id = "${var.vpc_id}"
comment = ""
}
output "zone_id" {
value = "${coalesce(var.zone_id, aws_route53_zone.main.zone_id)}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment