Skip to content

Commit

Permalink
Fix: Certain Redis infra features need to be disabled for localstack (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bryan-robitaille authored Oct 25, 2024
1 parent 24a430d commit 38d69c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws/redis/redis.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

resource "aws_elasticache_replication_group" "redis" {
# checkov:skip=CKV_AWS_191: KMS encryption using customer managed key not required
automatic_failover_enabled = true
automatic_failover_enabled = var.env == "local" ? false : true
replication_group_id = "gcforms-redis-rep-group"
description = "Redis cluster for GCForms"
node_type = "cache.t2.micro"
num_cache_clusters = var.env == "local" ? 1 : 2 # In Localstack, if Elasticache is used to host a Redis service it cannot have more than one node
engine_version = var.env == "local" ? "6.2" : "6.x" # Localstack does not accept the use of latest minor version (`.x`) at creation time
parameter_group_name = "default.redis6.x"
port = 6379
multi_az_enabled = true
multi_az_enabled = var.env == "local" ? false : true
subnet_group_name = aws_elasticache_subnet_group.redis.name
security_group_ids = [var.redis_security_group_id]
}
Expand Down

0 comments on commit 38d69c1

Please sign in to comment.