Skip to content

Commit 29f90e0

Browse files
authored
feat(elasticache-redis): add engine input for valkey support (#1170)
1 parent c9e2a90 commit 29f90e0

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

modules/elasticache-redis/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ components:
3838
num_replicas: 1
3939
num_shards: 0
4040
replicas_per_shard: 0
41+
engine: "redis"
4142
engine_version: 6.0.5
4243
instance_type: cache.t2.small
4344
parameters:
@@ -68,6 +69,9 @@ components:
6869
value: lK
6970
```
7071

72+
The `engine` can either be `redis` or `valkey`. For more information, see
73+
[why aws supports valkey](https://aws.amazon.com/blogs/opensource/why-aws-supports-valkey/).
74+
7175
<!-- prettier-ignore-start -->
7276
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
7377
## Requirements
@@ -109,6 +113,7 @@ No resources.
109113
| <a name="input_at_rest_encryption_enabled"></a> [at\_rest\_encryption\_enabled](#input\_at\_rest\_encryption\_enabled) | Enable encryption at rest | `bool` | n/a | yes |
110114
| <a name="input_attributes"></a> [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,<br>in the order they appear in the list. New attributes are appended to the<br>end of the list. The elements of the list are joined by the `delimiter`<br>and treated as a single ID element. | `list(string)` | `[]` | no |
111115
| <a name="input_auth_token_enabled"></a> [auth\_token\_enabled](#input\_auth\_token\_enabled) | Enable auth token | `bool` | `true` | no |
116+
| <a name="input_auto_minor_version_upgrade"></a> [auto\_minor\_version\_upgrade](#input\_auto\_minor\_version\_upgrade) | Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. Only supported if the engine version is 6 or higher. | `bool` | `false` | no |
112117
| <a name="input_automatic_failover_enabled"></a> [automatic\_failover\_enabled](#input\_automatic\_failover\_enabled) | Enable automatic failover | `bool` | n/a | yes |
113118
| <a name="input_availability_zones"></a> [availability\_zones](#input\_availability\_zones) | Availability zone IDs | `list(string)` | `[]` | no |
114119
| <a name="input_cloudwatch_metric_alarms_enabled"></a> [cloudwatch\_metric\_alarms\_enabled](#input\_cloudwatch\_metric\_alarms\_enabled) | Boolean flag to enable/disable CloudWatch metrics alarms | `bool` | n/a | yes |

modules/elasticache-redis/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ module "redis_clusters" {
6969
num_replicas = lookup(each.value, "num_replicas", 1)
7070
num_shards = lookup(each.value, "num_shards", 0)
7171
replicas_per_shard = lookup(each.value, "replicas_per_shard", 0)
72+
engine = lookup(each.value, "engine", "redis")
7273
engine_version = each.value.engine_version
7374
create_parameter_group = lookup(each.value, "create_parameter_group", true)
7475
parameters = lookup(each.value, "parameters", null)

modules/elasticache-redis/modules/redis_cluster/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ locals {
1010

1111
module "redis" {
1212
source = "cloudposse/elasticache-redis/aws"
13-
version = "1.4.1"
13+
version = "1.7.0"
1414

1515
name = var.cluster_name
1616

@@ -29,6 +29,7 @@ module "redis" {
2929
cluster_mode_replicas_per_node_group = var.replicas_per_shard
3030
cluster_size = var.num_replicas
3131
dns_subdomain = var.dns_subdomain
32+
engine = var.engine
3233
engine_version = var.engine_version
3334
family = var.cluster_attributes.family
3435
instance_type = var.instance_type

modules/elasticache-redis/modules/redis_cluster/variables.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ variable "create_parameter_group" {
1111
description = "Whether new parameter group should be created. Set to false if you want to use existing parameter group"
1212
}
1313

14+
variable "engine" {
15+
type = string
16+
default = "redis"
17+
description = "Name of the cache engine to use: either `redis` or `valkey`"
18+
}
19+
1420
variable "engine_version" {
1521
type = string
16-
description = "Redis Version"
22+
description = "Version of the cache engine to use"
1723
default = "6.0.5"
1824
}
1925

0 commit comments

Comments
 (0)