A Go library for estimating cloud infrastructure costs from Terraform plans using ingested cloud vendor pricing data.
TerraCost is a Go library that estimates cloud infrastructure costs from Terraform plans by ingesting pricing data from AWS, Google Cloud, and Azure. It solves the problem of predicting and analyzing infrastructure expenses before deployment, helping teams optimize costs directly within their infrastructure-as-code workflows.
DevOps engineers, platform teams, and developers who use Terraform for cloud infrastructure management and need programmatic cost estimation and analysis.
Developers choose TerraCost because it provides a library-based, self-hosted solution for accurate cost estimation integrated with Terraform, avoiding vendor lock-in and enabling customization within their own tools and pipelines.
Cloud cost estimation for Terraform in your CLI
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Estimates costs for AWS, Google Cloud, and Azure by ingesting pricing data into a MySQL database, enabling cross-provider analysis directly from Terraform plans as shown in the provider support docs.
Analyzes JSON Terraform plans to calculate prior and planned costs per resource, providing detailed cost differences for infrastructure changes, which is core to its value proposition.
Built as a Go library, it allows seamless integration into custom applications, APIs, or tools, offering flexibility beyond CLI-based solutions for teams building internal cost analysis.
Includes default usage configurations and supports custom overrides for resources needing extra data, as detailed in the usage.go file, enhancing accuracy for complex scenarios.
Optional progress tracking via the github.com/machinebox/progress library helps monitor long-running pricing data ingestion, with configurable update intervals for better visibility.
Requires a custom fork of Terraform and a MySQL database, adding initial setup overhead and potential compatibility issues with standard Terraform workflows, as noted in the installation steps.
Only supports a specific subset of resources for each cloud provider, as admitted in the README, which may not cover all infrastructure needs and requires checking documentation for support.
Ingesting Google pricing data demands credentials with Compute Engine API access and billing enabled, making setup more involved and error-prone compared to other providers.
As a library, users must build their own tools or integrate it into systems, lacking a ready-to-use standalone application, which increases development effort for basic use cases.