r/Terraform • u/Independent-Ease-609 • 3h ago
Discussion I open-sourced CloudCostTree, a CLI that prices Terraform, CloudFormation and Pulumi changes before you apply them
CloudCostTree reads your infrastructure code and shows a cost breakdown per resource, using real AWS rates from the AWS Price List. It also gives FinOps recommendations (Graviton, gp2 to gp3, business-hours schedules for non-production, Reserved Instances), each with its dollar figure.
What it covers today:
Terraform (HCL, plan or state), Terragrunt, Atmos, CloudFormation/CDK, Pulumi and rendered Kubernetes manifests
147 Terraform resource types. Anything it can't price is labeled as such, never guessed.
ci diff posts a cost comment on the PR (GitHub, GitLab, Azure, Bitbucket), and there's a GitHub Action
an MCP server (estimate, compare, what-if, IAM policy) for Claude, Cursor and other assistants
an IAM policy generator that writes the least-privilege policy a deployer role needs
It runs locally: no account needed, nothing uploaded. The core is Apache 2.0. There's a paid plan for teams that reads your real AWS usage and bill and enforces cost guardrails in CI, but everything that works from your own files is free.
Repo: https://github.com/rulssss/cloudcosttree
I'd really appreciate feedback, especially on resources it prices wrong or doesn't cover yet.