CDK synthesizes to CloudFormation, so you estimate cost from the synth output, run cdk synth, then price the templates in cdk.out. Here's how to get a cost per stack before cdk deploy, locally and in CI.
Add a job that runs after terraform plan, prices the plan JSON, and comments the monthly total and diff on the PR, with a budget gate that fails the check. Here's the workflow, the input that keeps it accurate, and how to keep it fast.
OpenTofu emits the same plan JSON as Terraform, so cost estimation works unchanged, run tofu show -json and price it. Here's how to estimate OpenTofu cost locally and in CI, and what stays identical after the fork.
Add a pipeline step after terraform plan that prices the plan and posts it as a PR comment, with a budget gate that fails the build. Here's the YAML, the plan-JSON input, and how it fits branch policies.
Estimating from terraform show -json prices the resolved resources, variables, conditionals, data sources all computed, unlike parsing raw HCL. Here's how to generate it, why it's accurate, and how it fits CI.
Atlantis already plans on every PR, add a post-plan workflow step that estimates cost and comments it, with a budget gate that blocks apply. Reuses the existing plan, works self-hosted and air-gapped.
The monthly bill is a lagging indicator. Estimating cost in the pull request puts the number where the change is still cheap to fix. Here's why shift-left cost works and what it can and can't predict.
Don't estimate a whole monorepo on every PR. Detect changed stacks, estimate only those in a CI matrix, and aggregate. Here's the pattern that keeps CI fast and attributes cost to the right stack.
Add a pre-commit hook that estimates Terraform cost on every commit and blocks over-budget changes. Runs in seconds, works offline, and pairs with a CI gate that can't be skipped.
Terragrunt's module composition breaks naive cost tools. Here's how to estimate a Terragrunt stack by resolving its dependency graph, run it in CI, and gate PRs on a budget, no apply required.
Add a GitLab CI job that estimates Terraform cost on every merge request, posts the number as an MR note, and fails the pipeline over budget. Works on self-hosted and air-gapped GitLab. No apply needed.
Cost regressions are a category of bug that production-quality teams catch automatically. Here's how to add a budget gate to GitHub Actions, GitLab CI, Bitbucket, Atlantis, and Spacelift in five minutes.
From a single CLI command to PR comments in CI that block over-budget merges, this is the practical guide to Terraform cost estimation. No AWS credentials, no terraform plan, no SaaS account.