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:
1 parent
e7408fb07a
commit
07fdf37d4b
6 files changed
+117
-7
No files matched your search
+47
@@ -35,6 +35,53 @@ moved {
|
||||
|
||||
This focuses on the resources that are "heavy" or store data. Note that the ALB cannot be moved like this because Dogfood uses the `aws_alb` resource and the module uses the `aws_lb` resource. The resources are aliases of eachother, but Terraform can't recognize that.
|
||||
|
||||
# Cache Engine: Redis vs Valkey
|
||||
|
||||
This module supports both Redis and [Valkey](https://valkey.io/) as the ElastiCache engine. Valkey is an open-source, Redis-compatible in-memory data store.
|
||||
|
||||
## Provider Requirements
|
||||
|
||||
When using this module, ensure your AWS provider version is >= 5.73.0:
|
||||
|
||||
```hcl
|
||||
terraform {
|
||||
required_providers {
|
||||
aws = {
|
||||
source = "hashicorp/aws"
|
||||
version = ">= 5.73.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Using Valkey (Recommended for Cost Savings)
|
||||
|
||||
To use Valkey instead of Redis, configure the `redis_config` variable:
|
||||
|
||||
```hcl
|
||||
redis_config = {
|
||||
engine = "valkey"
|
||||
engine_version = "7.2"
|
||||
family = "valkey7"
|
||||
instance_type = "cache.m5.large"
|
||||
cluster_size = 3
|
||||
}
|
||||
```
|
||||
|
||||
## Using Redis (Default)
|
||||
|
||||
Redis remains the default engine for backwards compatibility:
|
||||
|
||||
```hcl
|
||||
redis_config = {
|
||||
engine = "redis" # Default
|
||||
engine_version = "7.1"
|
||||
family = "redis7"
|
||||
instance_type = "cache.m5.large"
|
||||
cluster_size = 3
|
||||
}
|
||||
```
|
||||
|
||||
# How to improve this module
|
||||
If this module somehow doesn't fit your needs, feel free to contact us by
|
||||
opening a ticket, or contacting your contact at Fleet. Our goal is to make this module
|
||||
|
||||
Reference in new issue
Block a user