Interview Prep/Terraform/Pipelines Terraform Cloud and OpenTofu

Finance wants cost visibility on infrastructure PRs.

IntermediateScenarioPipelines Terraform Cloud and OpenTofu
Answer

Situation read → Cost surprise comes from unreviewed changes.

What I'd do →

  1. Add Infracost to the PR workflow: infracost breakdown --path . --format json and infracost diff against the base branch.
  2. Post the monthly cost delta as a comment.
  3. Add a policy that blocks PRs exceeding a threshold without approval.

Why → A "+$4,200/month" line changes review behaviour.

Interview tip → Cost estimates for usage-based resources are approximations.

All Terraform questions Roadmap: Terraform in production

More on Pipelines Terraform Cloud and OpenTofu