What it does
Infracost maps supported IaC resources to cloud pricing data and produces cost breakdowns and diffs. The upstream repository is archived, so treat it as a code study and verify the status of any successor tooling.
Why it’s interesting
Cost estimates in code review can surface large changes early. Pricing depends on region, usage assumptions, and product support, so estimates are not cloud invoices.
Real-world use case
Compare the estimated monthly cost of two VM sizes in a Terraform pull request.
What I can learn
- 01
HCL and Terraform plan parsing
Trace how configuration and plan data are mapped into resource attributes that can be evaluated for estimated cloud cost.
- 02
Provider price normalization
See how different provider price catalogs are normalized so comparable resources can be priced consistently.
- 03
CI checks and cost policy thresholds
Learn how cost diffs and budget thresholds become automated review feedback before infrastructure is deployed.
One thing to explore
Terraform resource pricing
Follow the internal/providers/terraform implementation and connect it to the concepts above.
Explore the source (opens in a new tab)10-Minute Challenge
Inspect a cost breakdown
Before you start: A browser; the archived project may no longer provide a working live pricing service.
- Check the repository archive notice and current project documentation.
- Browse how a Terraform resource maps to cost components.
- List the usage assumptions needed before comparing two instance sizes.