Skip to content

Commit

Permalink
Update elasticache terraform add policy resources to elasticache
Browse files Browse the repository at this point in the history
  • Loading branch information
cduhn17 committed Jul 22, 2024
1 parent 7d0527c commit 2c15be4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion infrastructure/elasticache.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,23 @@ resource "aws_elasticache_subnet_group" "crossfeed_vpc" {
}
}

resource "aws_elasticache_parameter_group" "xfd_redis_group" {
name = "my-redis7-1"
family = "redis7"

parameter {
name = "maxmemory-policy"
value = "allkeys-lru"
}
}

resource "aws_elasticache_cluster" "crossfeed_vpc_elasticache_cluster" {
count = var.create_elasticache_cluster ? 1 : 0
cluster_id = "crossfeed-vpc-cluster"
engine = "redis"
node_type = "cache.r7g.xlarge"
num_cache_nodes = 1
parameter_group_name = "default.redis7.1"
parameter_group_name = "aws_elasticache_parameter_group.xfd_redis_group.name"
engine_version = "7.1"
port = 6379
subnet_group_name = aws_elasticache_subnet_group.crossfeed_vpc.name
Expand Down

0 comments on commit 2c15be4

Please sign in to comment.