Skip to content

Commit

Permalink
fix: elasticache_subnet_group creation #78 (#79)
Browse files Browse the repository at this point in the history
Co-authored-by: Veronika Gnilitska <[email protected]>
  • Loading branch information
flightlesstux and gberenice authored May 8, 2024
1 parent 4f41139 commit 368c938
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ module "aws_security_group" {
# ElastiCache Resources
#
resource "aws_elasticache_subnet_group" "default" {
count = local.enabled ? 1 : 0
name = module.this.id
subnet_ids = var.subnets
count = local.enabled && var.elasticache_subnet_group_name == "" && length(var.subnets) > 0 ? 1 : 0
name = module.this.id
description = "Elasticache subnet group for ${module.this.id}"
subnet_ids = var.subnets
tags = module.this.tags
}

resource "aws_elasticache_parameter_group" "default" {
Expand Down

0 comments on commit 368c938

Please sign in to comment.