Interview Prep/Terraform/Pipelines Terraform Cloud and OpenTofu

How do you add a manual approval before prod applies?

IntermediateScenarioPipelines Terraform Cloud and OpenTofu
Answer

Situation read → Prod changes need a human gate.

What I'd do →

  1. Split the workflow: plan job produces the artifact; apply job targets a GitHub environment: production.
  2. Configure that environment with required reviewers and a deployment branch rule.
  3. Apply the saved plan from the artifact.
apply:
  needs: plan
  environment: production
  steps:
    - uses: actions/download-artifact@v4
      with: { name: tfplan }
    - run: terraform apply -input=false tfplan

Why → The approver sees the exact plan; the apply is bound to it.

Interview tip → Same shape in GitLab with when: manual and protected environments.

All Terraform questions Roadmap: Terraform in production

More on Pipelines Terraform Cloud and OpenTofu