Open multifunctional opened 2 years ago
@multifunctional from what I understood, the omission is supported as long as the AWS API supports it. I believe in this case, AWS doesn't support this kind of omission in the engine_version parameter. I read the Aurora documentation but couldn't really find any reference to the patch version omission, neither saying it does nor doesn't offer this support.
@multifunctional did you try using "5.7.mysql_aurora" instead of "5.7.mysql_aurora.2.07" as the engine_version ?
@phanitnum RDS API answers with InvalidParameterCombination: Cannot find upgrade target from 5.7.mysql_aurora.2.10.3 with requested version 5.7.mysql_aurora. status code: 400
I havent found a way around this except to bump to the latest correct version
It would be great to have this feature. It's really annoying to have hundreds of clusters in our fleet require manual Terraform code changes when AWS rolls out automatic minor version upgrades.
I use this method has worked for me.
Rather than doing this: "5.7.mysql_aurora.2.07.6" -> "5.7.mysql_aurora.2.07"
Do this instead: engine = "aurora-mysql" engine_version = "5.7" engine_mode = "provisioned"
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#engine_version https://stackoverflow.com/questions/66245653/aws-rds-database-version-is-different-than-terraform-version
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
My aurora mysql cluster is originally set up with engine_version = "5.7.mysql_aurora.2.07.6". I want be able to omit the minor version for aurora mysql (using aws_rds_cluster), so that AWS can automatically upgrade the minor version when needed. Based on the document in https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_cluster, I should be able to specify partial engine version. But this doesn't work, and is related to the issue described https://github.com/hashicorp/terraform-provider-aws/issues/13147 (where the issue is only resolved for db_instance, not rds_cluster nor rds_cluster_instance.
Actual Behavior
When I remove the minor version from the engine_version, i.e. changed from "5.7.mysql_aurora.2.07.6" to ""5.7.mysql_aurora.2.07", I get the error below in my terraform plan & deploy.