aws_db_instance restore from snapshot intermittent state collision. #14785
Labels
bug
Addresses a defect in current functionality.
service/rds
Issues and PRs that pertain to the rds service.
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform CLI Versionv0.12.20
Terraform AWS Provider Version 2.69.0
Affected Resource(s)
aws_db_instance
Terraform Configuration Files
Debug Output
[2020-08-20T03:42:14.996Z] module.rds.aws_db_instance.this: Still creating... [9m50s elapsed]
[2020-08-20T03:42:21.517Z] module.rds.aws_db_instance.this: Creation complete after 9m58s [id=db-instance]
[2020-08-20T03:42:24.891Z] module.rds.aws_db_instance.this: Still creating... [10m0s elapsed]
[2020-08-20T03:42:34.826Z] module.rds.aws_db_instance.this: Still creating... [10m10s elapsed]
[2020-08-20T03:42:44.714Z] module.rds.aws_db_instance.this: Still creating... [10m20s elapsed]
[2020-08-20T03:42:55.028Z] module.rds.aws_db_instance.this: Still creating... [10m30s elapsed]
[2020-08-20T03:43:04.850Z] module.rds.aws_db_instance.this: Still creating... [10m40s elapsed]
[2020-08-20T03:43:05.775Z] module.rds.aws_db_instance.this: Refreshing state... [id=db-instance]
[2020-08-20T03:43:09.292Z] module.rds.aws_db_instance.this: Modifying... [id=db-instance]
[2020-08-20T03:43:09.292Z]
[2020-08-20T03:43:09.292Z] Error: Error modifying DB Instance db-instance: InvalidDBInstanceState: Database instance is not in available state.
[2020-08-20T03:43:09.292Z] status code: 400, request id: 7d9c0234-e364-49e7-9eb6-e8d7886a8d0e
[2020-08-20T03:43:09.292Z]
[2020-08-20T03:43:09.292Z] on .terraform/modules/rds/main.tf line 1, in resource "aws_db_instance" "this":
[2020-08-20T03:43:09.292Z] 1: resource "aws_db_instance" "this" {
[2020-08-20T03:43:09.292Z]
Expected Behavior
The db instance should have been restored successfully
Actual Behavior
Because the password was set and the backup_retention_period differed from the snapshot, the aws provider attempted to modify both, presumably without the correct wait between modifying.
Steps to Reproduce
terraform apply
Important Factoids
The text was updated successfully, but these errors were encountered: