Created
September 8, 2016 12:57
-
-
Save caquino/759acac1cf6ed01ea1a8eea11e047ba9 to your computer and use it in GitHub Desktop.
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
| 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