Interview Prep/Terraform/Testing Upgrades and Large-Scale Operations

A failed apply left half the resources created. What do you do?

IntermediateScenarioTesting Upgrades and Large-Scale Operations
Answer

Situation read → Partial apply: Terraform saves progress to state as it goes.

What I'd do →

  1. Read the error; fix the cause (permissions, quota, name collision).
  2. Re-run terraform plan; it plans only what's missing.
  3. If a resource was created but not recorded (timeout), import it before applying.
  4. Apply again.

Why → Terraform is convergent: re-applying finishes the job.

Interview tip → Check for tainted resources in the plan.

All Terraform questions Roadmap: Terraform in production

More on Testing Upgrades and Large-Scale Operations