From fd3c8a0df867e1011c2e441a17b05b614ecbaf1c Mon Sep 17 00:00:00 2001 From: Nicolai Antiferov Date: Thu, 17 Jul 2025 20:12:38 +0300 Subject: [PATCH] Remove local.create_cluster logic due to fixed provider bug Provider bug was fixed in 5.84, but version is already bumped to 5.93, so no update needed. Fix: #43 --- main.tf | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/main.tf b/main.tf index 98cbbb0..cdeb42a 100644 --- a/main.tf +++ b/main.tf @@ -2,11 +2,6 @@ locals { # https://github.com/hashicorp/terraform-provider-aws/blob/3c4cb52c5dc2c09e10e5a717f73d1d8bc4186e87/internal/service/elasticache/cluster.go#L271 in_replication_group = var.replication_group_id != null - # elasticache clusters currently do not support engine type valkey - # TODO: remove this local `create_cluster` conditional once this bug is addressed: - # https://github.com/hashicorp/terraform-provider-aws/issues/39905 - create_cluster = var.create_cluster && var.engine != "valkey" ? true : false - security_group_ids = local.create_security_group ? concat(var.security_group_ids, [aws_security_group.this[0].id]) : var.security_group_ids port = var.engine == "memcached" ? 11211 : 6379 @@ -18,7 +13,7 @@ locals { ################################################################################ resource "aws_elasticache_cluster" "this" { - count = var.create && local.create_cluster ? 1 : 0 + count = var.create && var.create_cluster ? 1 : 0 apply_immediately = var.apply_immediately auto_minor_version_upgrade = var.auto_minor_version_upgrade