Skip to content

Commit 52213d7

Browse files
committed
feat(app-cache-redis): add support for Valkey engine
- feat: expose port variable - chore: update AWS provider version
1 parent 1781e3f commit 52213d7

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

modules/app-cache-redis/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module "redis_label" {
77

88
module "redis" {
99
source = "cloudposse/elasticache-redis/aws"
10-
version = "1.2.1"
10+
version = "1.9.0"
1111

1212
# Networking
1313
availability_zones = var.availability_zones
@@ -31,9 +31,11 @@ module "redis" {
3131
at_rest_encryption_enabled = true
3232
transit_encryption_enabled = true
3333

34-
# Redis settings
34+
# Redis/Valkey settings
35+
engine = var.engine
3536
engine_version = var.engine_version
3637
family = var.family
38+
port = var.port
3739
auth_token = var.password
3840

3941
context = module.redis_label.context

modules/app-cache-redis/variables.tf

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,30 @@ variable "instance_type" {
6060

6161
variable "family" {
6262
type = string
63-
default = "redis6.x"
64-
description = "Redis family"
63+
default = "redis7.x"
64+
description = "The family of the ElastiCache parameter group"
65+
}
66+
67+
variable "engine" {
68+
type = string
69+
default = "redis"
70+
description = "Name of the Redis-compatible cache engine. Valid values are: `redis` or `valkey`"
6571
}
6672

6773
variable "engine_version" {
6874
type = string
69-
default = "6.2"
70-
description = "Redis engine version"
75+
default = "7.1"
76+
description = "Version number of the cache engine"
77+
}
78+
79+
variable "port" {
80+
type = number
81+
default = 6379
82+
description = "Port number on which the cache nodes will accept connections"
7183
}
7284

7385
variable "password" {
7486
type = string
7587
description = "Auth token for password protecting redis, `transit_encryption_enabled` must be set to `true`. Password must be longer than 16 chars"
7688
default = null
77-
7889
}

modules/app-cache-redis/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.18"
7+
version = ">= 5.73"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)