Terraform: Error: waiting for RDS DB Instance create: timeout while waiting for state to become 'available' (last state: 'creating', timeout: 40m0s)
The resource didn't reach the target state before the provider's timeout.
timeout while waiting for state to become 'available' (last state: 'creating', timeout: 40m0s)Error: waiting for RDS DB Instance create: timeout while waiting for state to become 'available'Error: timeout while waiting for state to become 'ACTIVE'context deadline exceeded Terraform provider waitingError: waiting for EKS Cluster create: timeout while waiting for state Meaning
Large resources (RDS, EKS, CloudFront) take long. Increase the timeout with a timeouts {} block (create = "90m"), investigate if it's truly stuck (cloud console events: quota, subnet/IP exhaustion, permission failures), and rerun apply — Terraform will continue/replace a tainted resource. Check dependencies like KMS keys or networking.
Common causes
- Slow creation exceeding default timeout
- Provisioning stuck due to quota/capacity
- Subnet/IP exhaustion or networking misconfig
- Missing permissions (service-linked roles)
- Cloud outage/throttling
⚡ Quick fix
- Add
timeouts { create = "90m" } - Inspect the cloud console/events for the real error
- Re-run
terraform apply; handletaintedresources
Detailed fix by platform
Terraform
resource "aws_db_instance" "db" { ... timeouts { create = "90m" delete = "60m" } }
How to diagnose
- Last state — Stuck or slow?
- Console — Events?
- Timeout — Large enough?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- DependencyViolation: resource has dependent objects (destroy) Terraform: Error: deleting EC2 VPC (vpc-0abc): DependencyViolation: The vpc 'vpc-0abc' has dependencies and cannot be deleted
- Endpoint request timed out API Gateway: {"message": "Endpoint request timed out"} (504 after 29 seconds)
- Error creating resource: already exists (needs import) Terraform: Error: creating S3 Bucket (my-bucket): BucketAlreadyOwnedByYou / EntityAlreadyExists: Role with name x already exists
Most viewed in Terraform
- Error acquiring the state lock Terraform: Error: Error acquiring the state lock — ConditionalCheckFailedException / state blob is already locked
- Inconsistent dependency lock file Terraform: Error: Inconsistent dependency lock file — provider x: required by this configuration but no version is selected
- Reference to undeclared resource Terraform: Error: Reference to undeclared resource / Reference to undeclared input variable
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026