1
0
Files

2.0 KiB

Elasticache

Deploy a test redis replication group and then in-place migrate to Valkey

Migration steps (takes around 17m):

  1. Backup existing instance. Note the version and parameter group
  2. In the example resource below, change apply-immediately, engine, engine-version, and parameter group.

When redis was initially deployed:

primary_endpoint = "lab-cache001.rw4ynm.ng.0001.ape1.cache.amazonaws.com" reader_endpoint = "lab-cache001-ro.rw4ynm.ng.0001.ape1.cache.amazonaws.com"

After in-place migration to Valkey:

primary_endpoint = "lab-cache001.rw4ynm.ng.0001.ape1.cache.amazonaws.com" reader_endpoint = "lab-cache001-ro.rw4ynm.ng.0001.ape1.cache.amazonaws.com"

Fallback

Simply reverting the code below will result in a replacement of the replication group. Meaning fallback is not supported. One will need to deploy a new instance and restore from backup

Requirements

Name Version
terraform >= 1.11.0
aws ~> 6.0

Providers

Name Version
aws 6.37.0

Modules

No modules.

Resources

Name Type
aws_elasticache_replication_group.example resource
aws_elasticache_subnet_group.subnets resource

Inputs

Name Description Type Default Required
application n/a any n/a yes
aws-region n/a any n/a yes
customer-name n/a any n/a yes
environment n/a any n/a yes
owner n/a any n/a yes
project n/a any n/a yes

Outputs

Name Description
cluster_endpoint n/a
primary_endpoint n/a
reader_endpoint n/a

Authorship

This module was developed by xpk.