Open kevinsantiago-mnltechnology opened 1 week ago
Voting for Prioritization
Volunteering to Work on This Issue
Same here. Already installed provider 5.73.0 and here is my code:
resource "aws_elasticache_cluster" "this" {
cluster_id = "lab-valkey1"
engine = "valkey"
node_type = "cache.t4g.micro"
num_cache_nodes = 1
parameter_group_name = "default.valkey7"
engine_version = "7.2"
}
terraform {
required_version = ">= 1.3.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.73.0"
}
}
}
When I run terraform plan, it says valkey engine is not supported
❯ terraform plan
╷
│ Error: expected engine to be one of ["memcached" "redis"], got valkey
│
│ with aws_elasticache_cluster.this,
│ on main.tf line 3, in resource "aws_elasticache_cluster" "this":
│ 3: engine = "valkey"
│
╵
This looks wrong:
names.AttrEngine: {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
ExactlyOneOf: []string{names.AttrEngine, "replication_group_id"},
ValidateFunc: validation.StringInSlice([]string{engineMemcached, engineRedis}, false),
},
engineValkey
exists in consts.go so I suspect the fix is:
ValidateFunc: validation.StringInSlice([]string{engineMemcached, engineRedis, engineValkey}, false),
Terraform Core Version
1.9.8
AWS Provider Version
5.73.0
Affected Resource(s)
aws_elasticache_cluster
Expected Behavior
should accept valkey as an engine per 5.73.0 release
Actual Behavior
Error: expected engine to be one of ["memcached" "redis"], got valkey
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
i tried engine "valkey" in aws_elasticache_replication_group it is working.
References
Relates https://github.com/hashicorp/terraform-provider-aws/issues/39641.
Would you like to implement a fix?
None