# Terraform "LimitExceeded" service quota in CI

> Fix Terraform "LimitExceeded" in CI -- the account hit an AWS service quota (VPCs, EIPs, instances) so the create call was refused.

Source: https://latchkey.dev/learn/terraform/terraform-limitexceeded-quota-in-ci  
Updated: 2026-06-26

AWS enforces per-account, per-region service quotas. Terraform requested a resource that would exceed a quota -- too many VPCs, Elastic IPs, or instances -- so the create was rejected.

## Diagnose it: init, state, or credentials?

Terraform failures in CI are dominated by backend and credential problems rather than configuration errors. Confirm the runner can initialise, authenticate, and lock state before reading the plan.

```Terminal
terraform init -backend=true -input=false
terraform validate
terraform providers
terraform plan -input=false -no-color -detailed-exitcode
#   0 = no changes, 2 = changes, 1 = error
```

> A cancelled CI job can leave the state lock held, which blocks every later run with an error that reads like a permissions failure. Confirm no apply is genuinely running before force-unlocking.

## FAQ

### What causes Terraform "LimitExceeded" service quota in CI?

There are 2 common causes: account at the service quota and leaked resources from failed runs. The account already holds the maximum number of that resource in the region, so a new one cannot be allocated.

### How do I fix Terraform "LimitExceeded" service quota in CI?

There are 2 fixes depending on which cause you have: request a quota increase or free up resources and reduce footprint or consolidate. Work through them in order, since the first is the most common.

### What does Terraform "LimitExceeded" service quota in CI actually mean?

apply fails with LimitExceeded (e.g.

### How do I stop Terraform "LimitExceeded" service quota in CI happening again?

Track service quotas and request increases ahead of need. The prevention section lists 3 changes that keep it from recurring.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
