cloudposse / terraform-aws-elasticache-redis

Terraform module to provision an ElastiCache Redis Cluster
https://cloudposse.com/accelerate
Apache License 2.0
141 stars 244 forks source link

Issue managing 6.x clusters #88

Closed andrewward closed 3 years ago

andrewward commented 3 years ago

When creating a cluster you have to specify 6.x as the engine_version otherwise you get this error:

Error creating Elasticache Replication Group: InvalidParameterValue: Specific version selection is not allowed for '6.0.5', please use '6.x'

After creating the cluster using 6.x subsiquent runs fail with the following error until you update engine_version to 6.0.5:

error updating Elasticache Replication Group (harbor-cache): InvalidParameterCombination: Upgrading minor engine version for redis '6.x' using modify API is not allowed, please use Service Updates
Xyaren commented 3 years ago

Manually setting the engine_version to 6.0.5 after creating the cluster with 6.x will stop including it in consequent plans. This is probably a workaround with limited lifetime, as any update of the minor/micro version by aws will probably result in plans failing.

cocotton commented 3 years ago

Related: https://github.com/hashicorp/terraform-provider-aws/issues/15625

jseiser commented 3 years ago

The previous related issue was closed, and a new one is in place.

Related: https://github.com/hashicorp/terraform-provider-aws/pull/18920

This PR adds validation and handling to the engine_version parameter to specify it as needed by the API. It also adds the parameter engine_version_actual to output the actual in-use version. Additionally, in aws_elasticache_global_replication_group, it deprecates actual_engine_version in favour of engine_version_actual.

jseiser commented 3 years ago

This should be fixed in the next provider: 3.38.0

https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md

guidoilbaldo commented 3 years ago

I've tested the creation of a redis6.x cluster this morning with the latest AWS provider for TF version 3.38.0. It worked like a charm. The issue can be closed. Thank you!

andrewward commented 3 years ago

Thanks for confirming @guidoilbaldo!