hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.83k stars 9.18k forks source link

aws_rds_engine_version returning Error: multiple RDS engine versions #19453

Open ejimz opened 3 years ago

ejimz commented 3 years ago

Community Note

Terraform CLI and Terraform AWS Provider Version

Terraform v0.13.7 AWS v3.47.0

Affected Resource(s)

Terraform Configuration Files

data "aws_rds_engine_version" "last_version" {
  engine = "aurora-postgresql"
  version = "10.14"
}

Debug Output

https://gist.github.com/ejimz/638c041c89206cf6dd446be275883b1d

Expected Behavior

Align RDS aurora postgresql engine version in terraform state with the engine version in AWS. it was automatically upgraded with the "auto_minor_upgrade" feature)

Actual Behavior

"Error: multiple RDS engine versions" running "terraform plan"

Steps to Reproduce

  1. increase minor version in AWS with the auto_minor_version_upgrade flag enabled from 10.13 to 10.14 (its done autamatically by AWS)
  2. modify terraform "engine_version" parameter to 10.14 in order to align terraform state with the current engine_version running in AWS RDS
  3. terraform plan
Asthonishia commented 2 years ago

Is there a workaround while waiting for a fix ?

daniel-ciaglia commented 7 months ago

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#default_only