-
-
Notifications
You must be signed in to change notification settings - Fork 254
Closed
Description
Describe the Feature
What
Add support for restoring a Serverless Redis cluster from an existing snapshot by exposing the snapshot_arns_to_restore argument in this module.
Why
- AWS ElastiCache for Redis now offers a serverless deployment option.
- The Terraform resource
aws_elasticache_serverless_cachesupportssnapshot_arns_to_restore, but the module does not currently provide a way to pass this argument. - This feature is crucial for migrating a serverful Redis cluster to a new serverless Redis using a snapshot.
References
Proposed Solution
- Introduce a new variable, for example
serverless_snapshot_arns_to_restore. - Pass this variable to the
aws_elasticache_serverless_cache.defaultresource inmain.tf. - Update the README to document the new variable and provide usage examples.
Example Usage
module "redis_serverless" {
source = "cloudposse/elasticache-redis/aws"
serverless_enabled = true
serverless_snapshot_arns_to_restore = ["arn:aws:s3:::my-snapshot-bucket/redis-snapshot.rdb"]
}Expected Behavior
- The module should allow users to specify
snapshot_arns_to_restorewhen creating a serverless ElastiCache Redis. - A new serverless cluster is successfully restored from the provided snapshot ARN without additional manual steps.
Use Case
We want to migrate an existing (serverful) ElastiCache Redis cluster to serverless by creating a snapshot of the existing cluster and then restoring a new serverless cluster using that snapshot.
Describe Ideal Solution
- A new variable
serverless_snapshot_arns_to_restoreis exposed. - The value is directly passed to the
aws_elasticache_serverless_cache.defaultresource. - The README is updated to illustrate how to use this feature.
- Terraform plan/apply completes successfully, creating the serverless cluster from the snapshot.
Alternatives Considered
No response
Additional Context
No response
Metadata
Metadata
Assignees
Labels
No labels