Infracost

Cloud cost estimation tool for Terraform, OpenTofu, Pulumi, and CloudFormation. Infracost analyzes IaC code and shows the cost impact of changes before deployment — posting a cost diff comment on PRs showing what infrastructure changes will cost. Supports all major cloud providers (AWS, GCP, Azure) with a public pricing API and a CI/CD integration layer for Atlantis, GitHub Actions, GitLab, and more.

Evaluated Mar 06, 2026 (0d ago) v0.10+
Homepage ↗ Repo ↗ Developer Tools terraform cost finops iac cloud open-source ci-cd
⚙ Agent Friendliness
61
/ 100
Can an agent use this?
🔒 Security
84
/ 100
Is it safe for agents?
⚡ Reliability
80
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
82
Error Messages
75
Auth Simplicity
95
Rate Limits
80

🔒 Security

TLS Enforcement
100
Auth Strength
80
Scope Granularity
70
Dep. Hygiene
85
Secret Handling
85

Apache 2.0, open source, auditable. Pricing API key has minimal privilege. Terraform plan JSON may contain sensitive values — handle with care. Infracost does not store your Terraform code or state. SOC2 for Infracost Cloud.

⚡ Reliability

Uptime/SLA
82
Version Stability
82
Breaking Changes
80
Error Recovery
78
AF Security Reliability

Best When

You want to prevent cost surprises by showing developers the monthly cost impact of their Terraform changes before they merge, integrated directly into your PR workflow.

Avoid When

You need actual cloud billing analysis, chargeback reporting, or cost optimization recommendations for existing infrastructure — use purpose-built FinOps tools.

Use Cases

  • Show the monthly cost impact of Terraform changes in PR comments before deployment — '$+450/month' for adding an RDS instance
  • Enforce cost policies in CI/CD — block PRs that would increase infrastructure costs beyond defined thresholds
  • Audit existing infrastructure for cost anomalies and compare actual vs estimated costs using Infracost Cloud
  • Give agents awareness of cost implications when proposing or executing infrastructure changes
  • Build FinOps workflows where IaC changes require cost approval from budget owners before merging

Not For

  • Real-time cost monitoring — Infracost estimates future costs from IaC, not actual cloud billing; use CloudHealth or Apptio for actuals
  • Non-Terraform IaC tools without Infracost provider support — Ansible and CDK have limited/no support
  • Chargeback/showback reporting — Infracost focuses on cost estimation, not cost allocation across teams

Interface

REST API
Yes
GraphQL
No
gRPC
No
MCP Server
No
SDK
No
Webhooks
No

Authentication

Methods: api_key
OAuth: No Scopes: No

Free API key from Infracost.io for the pricing API. No auth needed for pure CLI offline mode. Infracost Cloud (managed dashboard) uses org-scoped API keys. Keys passed via INFRACOST_API_KEY environment variable.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

The core CLI and pricing API are free. Infracost Cloud is the optional SaaS layer for team visibility and policy enforcement. Most teams can get significant value from the free tier.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • Cost estimates depend on Terraform plan output — agents must run 'terraform plan' first and pass the plan JSON to Infracost
  • Spot instances, committed use discounts, and reserved instances are not factored into estimates — actual costs will differ from estimates
  • Some resource types are not yet supported — Infracost logs 'skipped' for unsupported resources without failing, potentially understating costs
  • Data transfer costs are not estimated (only compute/storage) — real cloud bills will be higher for data-intensive workloads
  • Infracost requires INFRACOST_API_KEY to access pricing data — CLI without key uses cached/embedded pricing which may be stale
  • JSON output (--format json) is required for machine parsing — default human-readable output is not suitable for agent consumption
  • Cost estimates assume on-demand pricing by default — enterprise agreements and negotiated pricing can significantly differ

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Infracost.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered