Skip to content

Commit eb3a647

Browse files
MoonMoon1919osterman
authored andcommitted
normalize disable method (#27)
* normalize disable method switch variable default to empty string, switch enable bool to check length of zone_id variable * regenerate readme
1 parent d129bdf commit eb3a647

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Available targets:
115115
| tags | Additional tags (_e.g._ map("BusinessUnit","ABC") | map | `<map>` | no |
116116
| transit_encryption_enabled | Enable TLS | string | `true` | no |
117117
| vpc_id | AWS VPC id | string | `REQUIRED` | no |
118-
| zone_id | Route53 DNS Zone id | string | `false` | no |
118+
| zone_id | Route53 DNS Zone id | string | `` | no |
119119

120120
## Outputs
121121

docs/terraform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
| tags | Additional tags (_e.g._ map("BusinessUnit","ABC") | map | `<map>` | no |
3131
| transit_encryption_enabled | Enable TLS | string | `true` | no |
3232
| vpc_id | AWS VPC id | string | `REQUIRED` | no |
33-
| zone_id | Route53 DNS Zone id | string | `false` | no |
33+
| zone_id | Route53 DNS Zone id | string | `` | no |
3434

3535
## Outputs
3636

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ resource "aws_cloudwatch_metric_alarm" "cache_memory" {
118118

119119
module "dns" {
120120
source = "git::https://github.com/cloudposse/terraform-aws-route53-cluster-hostname.git?ref=tags/0.2.1"
121-
enabled = "${var.enabled == "true" && var.zone_id != "false"}"
121+
enabled = "${var.enabled == "true" && length(var.zone_id) > 0 ? "true" : "false"}"
122122
namespace = "${var.namespace}"
123123
name = "${var.name}"
124124
stage = "${var.stage}"

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ variable "availability_zones" {
120120
}
121121

122122
variable "zone_id" {
123-
default = "false"
123+
default = ""
124124
description = "Route53 DNS Zone id"
125125
}
126126

0 commit comments

Comments
 (0)