-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RDS InvalidDBInstanceState: Instance cannot currently reboot due to an in-progress management operation #11905
Comments
I think the
It is possible to get past this by untainting the resource and running the apply again Reproduced on provider version 2.51.0 |
Seeing this as well in us-east-1 (the OP is from us-west-1). It looks like Terraform should probably just retry in the face of these errors |
I have faced this error every time i try to create new replica instances; there has not even been a single time where this succeeds. I do notice everytime that the replica instance gets created successfully in the console but the terraform state still marks it as a tainted resource. This is a very nasty bug preventing the creation of new RDS replicas on AWS which could also cause breaks to your service configuration when running new RDS replica creation with other configuration changes. Until this is fixed, i would not suggest running any other type of configuration along with the creation of RDS replicas. The workaround I did was to import the tainted RDS replica resources into my state since the resources were created successfully in the console. Terraform please fix this!! |
You're seeing this because on Amazon's side some of the configuration is done as separate operations but on the Terraform side it's all represented as a single object. I know enhanced monitoring works like this so I imagine people with more config spread across more API calls hit this more often |
no really, this issue happened to me while I attempted to create new replicas by themselves with no other resources, everytime |
@roscoecairney what would be the explanation behind the ca_cert_identifier being the issue and how did you identify this. provide more details please |
Strange behavior, also after removing |
Can confirm this issue exists even with the latest version (v.3.29.1 at the time of this comment) of the provider. Only occurs on creation of new read replicas with enhanced monitoring enabled. Like the others, we didn't need to specify |
Any news on this issue? facing the same behavior. When running apply i get this error: And when running the plan again, it want to replace the resource: EDIT: Please advice. |
Still running into this. 0.12.28 for me. It would be nice if the provider had backoff/retry logic on this. |
Hey y'all 👋 Thank you for taking the time to file this issue, and for the ongoing discussion. Given that there's been a number of AWS provider releases since the last update, can anyone confirm whether you're still experiencing this behavior? |
We saw this error on version |
I have the same issue with provider version 3.67.0 and 3.37.0 I created a request regarding this issue to AWS Support center and I got following response: Please refer to the below timeline with regard to your test of the instance named *** according to the attached log file. As you can see, your first reboot was successful. The command was launched 65 seconds after the Modify. Possible reason -- Suggestions to you --
|
This functionality has been released in v4.0.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Terraform Version
Terraform v0.12.20
provider.aws v2.46.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
Shortened debug output here: https://gist.github.com/kbaldyga/825f0239776463a69969b847f35d53bd
Expected Behavior
When adding a read-replica to an existing RDS instance, with a custom db parameter group, enhanced monitoring and ca_cert_identifier, terraform will randomly fail with
Instance cannot currently reboot due to an in-progress management operation
. The read replica is eventually correctly created, but the resource is marked as tainted and terraform returns an error response code.Actual Behavior
When adding a read-replica to an existing RDS instance, terraform aws provider performs multiple steps:
rds/CreateDBInstanceReadReplica
), this than waits (rds/DescribeDBInstances
) for the instance to be available,ModifyDBInstance
(see attached log file), this again callsrds/DescribeDBInstances
multiple times and waits for the instance to be available,rds/RebootDBInstance
. But in the meantime AWS decides to apply changes to the instance and the call tords/RebootDBInstance
fails.Because this all depends on time, it's difficult to consistently reproduce the issue. But after spending some time with various configurations, I am pretty confident it's the combination of all 3: enhanced monitoring, ca_cert_identifier, and custom parameter group in the
resource "aws_db_instance" "rds-read"
that's causing the issue.As a workaround we decided to remove the
ca_cert_identifier
for now from our terraform configuration, since "rds-ca-2019" is the new default anyways.The text was updated successfully, but these errors were encountered: