Skip to content

Commit

Permalink
Only create elasticache subnet if enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
abhiyerra committed Aug 22, 2024
1 parent 1f2e206 commit b9f048e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions redis.tf
Original file line number Diff line number Diff line change
@@ -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)
}
Expand Down

0 comments on commit b9f048e

Please sign in to comment.