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.87k stars 9.21k forks source link

[Bug]: Error: updating RDS Cluster Instance (aurora-sandbox-rds-instance-0): InvalidDBInstanceState: Database instance is not in available state. #30637

Open tscho17 opened 1 year ago

tscho17 commented 1 year ago

Terraform Core Version

0.14.11

AWS Provider Version

4.61.0

Affected Resource(s)

aws_rds_cluster_instance

Expected Behavior

Attributes tags, tags_all and instance_class of Aurora-PostgreSQL DB instance are updated with a single terraform apply run.

Actual Behavior

Attributes tags, tags_all and instance_class of Aurora-PostgreSQL DB instance cannot be updated with a single terraform apply run (see error message). With two separate terraform apply runs - the first one for tags and tags_all attributes and a second one for the instance_class attribute - the update works.

Relevant Error/Panic Output Snippet

Error: updating RDS Cluster Instance (aurora-sandbox-rds-instance-0): InvalidDBInstanceState: Database instance is not in available state.
status code: 400, request id: 5ce04c66-1138-4ad8-9233-9b5ac64bcec1

Terraform Configuration Files

Terraform plan which causes the error

  # module.aurora_sandbox.aws_rds_cluster_instance.pg_instance[0] will be updated in-place
  ~ resource "aws_rds_cluster_instance" "pg_instance" {
        id                                    = "aurora-sandbox-rds-instance-0"
      ~ instance_class                        = "db.t3.medium" -> "db.t3.large"
      ~ tags                                  = {
          - "mail"   = "my.name@domain.com" -> null
        }
      ~ tags_all                              = {
          - "mail"   = "my.name@domain.com"
        } -> (known after apply)
        # (26 unchanged attributes hidden)
    }

Steps to Reproduce

Apply the following terraform plan

  # module.aurora_sandbox.aws_rds_cluster_instance.pg_instance[0] will be updated in-place
  ~ resource "aws_rds_cluster_instance" "pg_instance" {
        id                                    = "aurora-sandbox-rds-instance-0"
      ~ instance_class                        = "db.t3.medium" -> "db.t3.large"
      ~ tags                                  = {
          - "mail"   = "my.name@domain.com" -> null
        }
      ~ tags_all                              = {
          - "mail"   = "my.name@domain.com"
        } -> (known after apply)
        # (26 unchanged attributes hidden)
    }

Debug Output

No response

Panic Output

No response

Important Factoids

Due to reasons we must stick to the old terraform version 0.14.11.

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue