I have setup a redis cache like this
resource "aws_elasticache_serverless_cache" "example" {
engine = "redis"
name = "example"
cache_usage_limits {
data_storage {
maximum = 10
unit = "GB"
}
ecpu_per_second {
maximum = 5000
}
}
daily_snapshot_time = "09:00"
description = "Test Server"
kms_key_id =module.cmk.arn
major_engine_version = "7"
snapshot_retention_limit = 1
#security_group_ids = [aws_security_group.test.id]
subnet_ids = module.subnets.subnet_ids
}
and what I would like to do is changing the engine from Redis to Valkey.
While on AWS console this process sets the cluster in Modify Status (and updates downtime free), Terraform does a force replacement.
-/+ resource "aws_elasticache_serverless_cache" "example" {
~ arn = "arn:aws:elasticache:eu-central-1:517455374594:serverlesscache:example" -> (known after apply)
~ create_time = "2025-02-18T12:49:49Z" -> (known after apply)
~ endpoint = [
- {
- address = "example-foobar"
- port = 6379
},
] -> (known after apply)
~ engine = "redis" -> "valkey" # forces replacement
~ full_engine_version = "7.1" -> (known after apply)
~ id = "example" -> (known after apply)
name = "example"
~ reader_endpoint = [
- {
- address = "example-foobar"
- port = 6380
},
] -> (known after apply)
~ security_group_ids = [
- "sg-666aff0b",
] -> (known after apply)
~ status = "available" -> (known after apply)
# (7 unchanged attributes hidden)
# (1 unchanged block hidden)
}
Is this a missing feature or how can I achieve the same with terraform?
Terraform v1.10.5
on linux_arm64
hashicorp/aws v5.87.0