Advanced Reading #terraform #iac #devops

🏔️ Reading Terraform Error Output

4 exercises — read real terraform plan/apply error output. State locks, forced replacements, dependency cycles, and "already exists" errors.

Terraform plan symbols
  • + create · - destroy · ~ update in place · -/+ destroy then recreate
  • # forces replacement — the provider comment explaining why an in-place update isn't possible
  • "Error acquiring the state lock" — a safety mechanism, not a crash; someone else is applying right now
  • "Cycle: ..." — a circular dependency in your resource graph, most often in security group rules
Talking about it out loud (Slack / stand-up)
  • "Apply's blocked — state lock's held by another CI run, checking if it's still going."
  • "Heads up, this plan replaces the instance, not updates it — might mean downtime."
  • "Terraform found a circular dependency between the security groups — restructuring the rules."
  • "The bucket already exists in our account, state just doesn't know about it — I'll import it."
0 / 4 completed
1 / 4
🏔️ terraform apply output — state lock error
{ex.passage}
What does "Error acquiring the state lock" mean, and what does the "Who: ci@runner-3421" line tell you?