Terraform: AWS RDS provisioning times out

Created on 24 Mar 2016  ยท  12Comments  ยท  Source: hashicorp/terraform

Appears similar to now closed Bug #438-AWS RDS provisioning times out - needing larger or configurable timeout
May be fixed with the resolution of #5161-Timeout on destroying rds with skip_final_snapshot = false

When running the AWS Provider, RDS Oracle provisioning, with multi-AZ, the provisioning takes longer than the 40 min hard-coded in Terraform timeout and errors out:

aws_db_instance.test: Error: timeout while waiting for state to become 'available'
Error applying plan:
1 error(s) occurred:
timeout while waiting for state to become 'available'

After this, the instance does complete creating. But, Terraform is unaware. If I attempt to run apply again, it will destroy the instance; recreate & timeout again.

Attempted workaround: I've tried provisioning it with 'rds_is_multi_az=false' (which completes within the 40 minutes & succeeds) and then, running a 2nd apply with 'rds_is_multi_az=true'. Unfortunately, this doesn't work, as Terraform sees this as an entirely new DB Instance & throws the error that the instance already exists:

Output from running terraform apply -var 'rds_is_multi_az=true' after successfully running terraform apply -var 'rds_is_multi_az=false"

Error applying plan:
1 error(s) occurred:
aws_db_instance.main_rds_instance: Error creating DB Instance: DBInstanceAlreadyExists: DB Instance already exists
       status code: 400, request id: 4casdf31-f134-11e5-8asb-0d4dasda6dca
bug provideaws

All 12 comments

$ terraform version
Terraform v0.6.14

Seeing this issue as well (ver 0.7.1 & ver 0.7.2),
would be great if we could at least configure the timeout instead of having it hardcoded to 40 min or bump the timeout significantly.

Mine came online shortly after 50 min after restoring from a snapshot,
but that can of course vary from time to time.

After hitting the timeout and waiting until the RDS instance is available a terraform refresh followed by a terraform apply works but this is not very convenient.

Same issue for me. Booting aurora from snapshot takes 45 minutes, however the 40 minute hardcoded timeout beats it. When running the plan again the aurora instance is destroyed and then tried to be created again, etc.

It would be fantastic to not have this number hardcoded, but some sane default which could be provided in the config if I know the resource is going to take longer to create.

I.e. if my instance takes longer than 10 minutes to boot then I want the plan to fail so I can investigate. If booting my aurora instance from a snapshot takes longer than 60 minutes then fail and I can investigate.

I dont think a hardcoded 'one size fits all' timeout is very useful at all.

This issue is affecting me too, a configurable timeout with the default of no timeout would be perfect.

+1

+1

+1

Seems like this can be closed now given the timeouts options?

https://www.terraform.io/docs/providers/aws/r/db_instance.html

@arsdehnel You're right. Thanks for the note. Closing.

@SerCeMan @paulszabo

+1

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.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

larstobi picture larstobi  ยท  3Comments

zeninfinity picture zeninfinity  ยท  3Comments

rjinski picture rjinski  ยท  3Comments

ketzacoatl picture ketzacoatl  ยท  3Comments

rnowosielski picture rnowosielski  ยท  3Comments