Add Valkey support for ElastiCache (#158)

## Summary

This PR adds support for AWS ElastiCache Valkey as an alternative to
Redis, addressing #44.

## Changes

- **Upgrade cloudposse module**: Updated
`cloudposse/elasticache-redis/aws` from v0.53.0 to >= 1.9.1
- **Add engine parameter**: New `engine` field in `redis_config`
supports both `redis` (default) and `valkey`
- **AWS provider constraint**: Added requirement for AWS provider >=
5.73.0 in `byo-vpc/versions.tf`
- **Documentation**: Added Valkey configuration examples to README

## Valkey Benefits

Valkey is an open-source, Redis-compatible in-memory data store. AWS
recommends using Valkey for cost savings.

## Usage

To use Valkey instead of Redis:

```hcl
redis_config = {
  engine         = "valkey"
  engine_version = "7.2"
  family         = "valkey7"
}
```

## Backwards Compatibility

- Default engine remains `redis` - existing deployments continue to work
unchanged
- Users can opt-in to Valkey by setting `engine = "valkey"

Note that this was mostly AI-generated.

Closes #44

---------

Co-authored-by: Robert Fairburn <8029478+rfairburn@users.noreply.github.com>
This commit is contained in:
Michal HrubyandRobert Fairburn authored and GitHub committed 2026-01-09 02:49:14 -06:00
1 parent e7408fb07a
commit 07fdf37d4b
6 files changed
+117 -7

No files matched your search

+4 -2
View File
@@ -126,8 +126,9 @@ variable "redis_config" {
instance_type = optional(string, "cache.m5.large")
apply_immediately = optional(bool, true)
automatic_failover_enabled = optional(bool, false)
engine_version = optional(string, "6.x")
family = optional(string, "redis6.x")
engine = optional(string, "redis")
engine_version = optional(string, "7.1")
family = optional(string, "redis7")
at_rest_encryption_enabled = optional(bool, true)
transit_encryption_enabled = optional(bool, true)
parameter = optional(list(object({
@@ -148,6 +149,7 @@ variable "redis_config" {
instance_type = "cache.m5.large"
apply_immediately = true
automatic_failover_enabled = false
engine = "redis"
engine_version = "6.x"
family = "redis6.x"
at_rest_encryption_enabled = true