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 →
- Add Infracost to the PR workflow:
infracost breakdown --path . --format jsonandinfracost diffagainst the base branch. - Post the monthly cost delta as a comment.
- 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.
More on Pipelines Terraform Cloud and OpenTofu
Build a basic GitHub Actions pipeline: plan on pull request, apply on merge to main.BeginnerReviewers can't read raw plan logs. How do you present the plan in the PR?IntermediateTwo PRs merge close together and both apply to the same stack. What prevents trouble?IntermediateHow do you add a manual approval before prod applies?IntermediateCompare Atlantis, HCP Terraform and a hand-built GitHub Actions pipeline.IntermediateA saved plan was approved yesterday and apply fails because main changed. How do you avoid dead approvals?Intermediate