Interview Prep/Terraform/Pipelines Terraform Cloud and OpenTofu

A saved plan was approved yesterday and apply fails because main changed. How do you avoid dead approvals?

IntermediateScenarioPipelines Terraform Cloud and OpenTofu
Answer

Situation read → Long gaps between plan and apply make stale plans likely.

What I'd do →

  1. Plan on the merge commit in the apply pipeline, then approve and apply right after.
  2. Set an expiry on approvals and re-plan if older than N hours.
  3. Use merge queues so each change is planned against current main.

Why → The shorter the plan-to-apply window, the less drift can intervene; the stale-plan check is the safety net, not the workflow.

Interview tip → Distinguish "PR plan" (informational) from "apply plan" (binding).

All Terraform questions Roadmap: Terraform in production

More on Pipelines Terraform Cloud and OpenTofu