Terraform Runbooks

Plan/apply errors, state corruption, provider drift, and lock issues.

20 scenarios · search and filter below, or jump via the quick nav.

Intermediate11 runbooks
State lock held — error acquiring the state lockcritical

Error acquiring the state lock: Error message: ConditionalCheckFailedException

TerraformIntermediate3 causes
1Open runbook
Plan shows unexpected destroy — resource drift or replacementhigh

terraform plan shows - destroy for resources that should exist

TerraformIntermediate3 causes
2Open runbook
Provider version mismatch — required_providers constraint conflicthigh

Error: resource <type> requires version X.Y.Z but provider only has version A.B.C

TerraformIntermediate2 causes
3Open runbook
Invalid for_each — must be a map, set, or objectmedium

The given "for_each" argument value is unsuitable: must be a map, or set of strings

TerraformIntermediate2 causes
4Open runbook
Error creating resource — hard dependency orderinghigh

aws_instance.example: creating... error: InvalidVpcID.NotFound

TerraformIntermediate3 causes
5Open runbook
S3 backend bucket missing — cannot initialize state backendcritical

Error: Unable to find matching value for tag

TerraformIntermediate2 causes
6Open runbook
Registry unreachable — cannot download provider or modulehigh

Failed to request access to registry.terraform.io

TerraformIntermediate3 causes
7Open runbook
Index out of range — accessing empty resource attributesmedium

This object does not have an attribute named "ids"

TerraformIntermediate2 causes
8Open runbook
Sensitive data visible in plan outputcritical

terraform plan output shows plaintext passwords or API keys

TerraformIntermediate3 causes
9Open runbook
Module version not pinned — breaking upgradehigh

terraform init -upgrade pulls a breaking module version

TerraformIntermediate2 causes
10Open runbook
Shell expansion broken by quoting — comma/asterisk in valuesmedium

Terraform variable value contains unexpected commas or spaces

TerraformIntermediate2 causes
11Open runbook