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.73k stars 9.09k forks source link

[Bug]: RDS Blue/Green Deployments, not waiting for storage optimisation #35802

Open low613 opened 6 months ago

low613 commented 6 months ago

Terraform Core Version

1.7.3

AWS Provider Version

5.36.0

Affected Resource(s)

Expected Behavior

When modifying storage via blue-green deployment, It should wait for storage optimisation before proceeding

Actual Behavior

It doesnt wait hence throwing an error when it tries to action the switchover

Relevant Error/Panic Output Snippet

ā”‚ Error: updating RDS DB Instance (instance): switching over Blue/Green Deployment: operation error RDS: SwitchoverBlueGreenDeployment, https response error StatusCode: 400, RequestID: XXXXXXXXXXXX, InvalidBlueGreenDeploymentStateFault: DB instance instance-green-vl1i0f is not in available state

Terraform Configuration Files

resource "aws_db_instance" "blue_green_test" {
  instance_class        = "db.t4g.micro"
  username              = "test"
  password              = var.password
  allocated_storage     = 35
  max_allocated_storage = 200
  skip_final_snapshot   = true

  engine         = "mariadb"
  engine_version = "10.6"
  blue_green_update {
    enabled = true
  }
  storage_type = "gp3"

  auto_minor_version_upgrade = true
  storage_encrypted          = true
  multi_az                   = false

  performance_insights_enabled          = false
  performance_insights_retention_period = 0
  enabled_cloudwatch_logs_exports       = ["error", "slowquery"]

  backup_retention_period = 7

}

Steps to Reproduce

  1. Create Db instance with gp2 storage and blue_green_update enabled
  2. update the DB to use gp3
  3. run terraform apply

Observe failure when the db is in storage optimisation

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 6 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue