From b9f048efa4e32efb1b29c6d303a5ed42bc2374fc Mon Sep 17 00:00:00 2001 From: Abhi Yerra Date: Thu, 22 Aug 2024 11:28:57 -0700 Subject: [PATCH] Only create elasticache subnet if enabled --- redis.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/redis.tf b/redis.tf index 7625f627..5327216e 100644 --- a/redis.tf +++ b/redis.tf @@ -1,4 +1,6 @@ resource "aws_elasticache_subnet_group" "default" { + count = var.redis_enabled ? 1 : 0 + name = var.environment_name subnet_ids = concat(aws_subnet.private.*.id, aws_subnet.public.*.id) }