From 42cee942931b4b40137a52cfe00d19cd185c6b6f Mon Sep 17 00:00:00 2001 From: sharath-sequoia <52989442+sharath-sequoia@users.noreply.github.com> Date: Tue, 9 Jun 2020 11:12:53 +0530 Subject: [PATCH 1/3] Fix input variable name in Readme Example Change automatic_failover to automatic_failover_enabled in Readme example to align with the actual inputs. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ade048..f4128ab 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ For automated tests of the complete example using [bats](https://github.com/bats cluster_size = var.cluster_size instance_type = var.instance_type apply_immediately = true - automatic_failover = false + automatic_failover_enabled = false engine_version = var.engine_version family = var.family at_rest_encryption_enabled = var.at_rest_encryption_enabled From c983e2b3d4bbab63f7e686637900e95c71314266 Mon Sep 17 00:00:00 2001 From: sharath-sequoia <52989442+sharath-sequoia@users.noreply.github.com> Date: Tue, 9 Jun 2020 11:30:39 +0530 Subject: [PATCH 2/3] Update README.yaml Fix input variable name for automatic_failover_enabled --- README.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.yaml b/README.yaml index fcc1c87..7e0a2da 100644 --- a/README.yaml +++ b/README.yaml @@ -92,7 +92,7 @@ usage: |- cluster_size = var.cluster_size instance_type = var.instance_type apply_immediately = true - automatic_failover = false + automatic_failover_enabled = false engine_version = var.engine_version family = var.family at_rest_encryption_enabled = var.at_rest_encryption_enabled From 60cc6313bd100af04c08197b23bb817b77557fbe Mon Sep 17 00:00:00 2001 From: Sharath AV Date: Tue, 9 Jun 2020 14:56:56 +0530 Subject: [PATCH 3/3] Fix for https://github.com/cloudposse/terraform-aws-elasticache-redis/issues/63 --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 44f469d..27eb859 100644 --- a/main.tf +++ b/main.tf @@ -88,7 +88,7 @@ resource "aws_elasticache_replication_group" "default" { number_cache_clusters = var.cluster_mode_enabled ? null : var.cluster_size port = var.port parameter_group_name = join("", aws_elasticache_parameter_group.default.*.name) - availability_zones = var.cluster_mode_enabled ? null : slice(var.availability_zones, 0, var.cluster_size) + availability_zones = length(var.availability_zones) == 0 ? null : slice(var.availability_zones, 0, var.cluster_size) automatic_failover_enabled = var.automatic_failover_enabled subnet_group_name = local.elasticache_subnet_group_name security_group_ids = var.use_existing_security_groups ? var.existing_security_groups : [join("", aws_security_group.default.*.id)]