Terraform cost estimation tool for AWS, Azure, and GCP
terraquote is a CLI tool that parses Terraform plans and estimates cloud infrastructure costs across AWS, Azure, and GCP. The tool integrates with CI/CD pipelines to provide cost visibility before infrastructure deployment, preventing cost surprises.
terraquote helps you understand the cost implications of your Terraform infrastructure changes before you deploy them. By analyzing Terraform plans or HCL files, it provides accurate monthly cost estimates with confidence levels, helping teams make informed decisions about infrastructure changes.
- Multi-Cloud Support: Estimate costs for AWS, Azure, and GCP resources
- Terraform Plan Parsing: Works with Terraform plan JSON files
- Direct HCL Parsing: Analyze Terraform files directly without generating plans
- Accurate Pricing: Uses official cloud provider pricing APIs with local caching
- CI/CD Integration: Designed for GitHub Actions, GitLab CI, Azure DevOps, Bitbucket, and Jenkins
- Usage-Based Modeling: Model variable costs (data transfer, requests, etc.) with usage profiles
- Cost Thresholds: Enforce cost limits in CI/CD pipelines
- Offline Operation: Works in air-gapped environments with bundled pricing data
- Custom Pricing: Import enterprise discounts and custom pricing from billing exports
Get cost estimates before deploying infrastructure changes, avoiding unexpected bills at the end of the month.
Integrate cost checks into your CI/CD pipeline to automatically flag or block changes that exceed budget thresholds.
Identify expensive resources before deployment and explore cost-effective alternatives.
Estimate costs for new infrastructure projects and plan budgets accordingly.
Compare costs across AWS, Azure, and GCP to make informed provider decisions.
# Build from source
git clone https://github.com/raafeh/terraquote.git
cd terraquote
go build -o bin/terraquote ./cmd/terraquoteRun with ./bin/terraquote from the project root, or add bin to your PATH and use terraquote directly.
# Generate a Terraform plan
terraform plan -out=plan.out
terraform show -json plan.out > plan.json
# Estimate costs
terraquote estimate plan.json# Analyze Terraform files directly (no plan needed)
terraquote check . --var-file=production.tfvars# Sync pricing data from cloud provider APIs
terraquote pricing sync --providers aws,azure,gcp
# Check pricing cache status
terraquote pricing status# Estimate with usage profile
terraquote estimate plan.json --usage-profile medium
# Compare multiple usage scenarios
terraquote estimate plan.json --compare-usage low,medium,highFor CI cost gates use --threshold-monthly or --threshold-percentage with --threshold-action fail|warn. For offline or air-gapped use, run terraquote estimate plan.json --offline (see Air-Gapped).
terraquote supports multiple output formats for different use cases:
- Table (default): Human-readable console output
- JSON: Machine-readable output for automation
- Detailed: Comprehensive breakdown with confidence levels
- GitHub: Formatted for GitHub PR comments
- GitLab: Formatted for GitLab MR comments
- Azure DevOps: Formatted for Azure DevOps PR comments
- Bitbucket: Formatted for Bitbucket PR comments
- Jenkins: Formatted for Jenkins console output
# JSON output
terraquote estimate plan.json --format json --output costs.json
# Detailed breakdown
terraquote estimate plan.json --format detailedFor detailed usage instructions, see the comprehensive user guides:
- Getting Started Guide - First-time setup and basic usage
- Cloud Provider Credentials - Configure AWS, Azure, and GCP credentials
- Standalone Usage - Running terraquote locally
- Single-Cloud Workflows - AWS-only, Azure-only, or GCP-only setups
- Multicloud Workflows - Working with multiple cloud providers
- CI/CD Integration Guide - Overview of CI/CD integrations
- GitHub Actions - GitHub Actions integration
- GitLab CI - GitLab CI integration
- Azure DevOps - Azure DevOps integration
- Bitbucket Pipelines - Bitbucket integration
- Jenkins - Jenkins integration
- Pricing Cache Management - Managing pricing data cache
- Air-Gapped Environments - Using terraquote offline
Resource Provider Monthly Cost Confidence
─────────────────────────────────────────────────────────────────────────────────
aws_instance.web AWS $15.36 exact
aws_s3_bucket.data AWS $0.23 exact
└─ Storage (1 GB) AWS $0.02 exact
└─ PUT requests (1,000) AWS $0.01 exact
└─ GET requests (10,000) AWS $0.20 exact
azure_virtual_machine.app Azure $73.00 exact
gcp_compute_instance.db GCP $24.00 exact
─────────────────────────────────────────────────────────────────────────────────
Total Monthly Cost: $112.59
For complete documentation, see the Documentation Hub:
- Getting Started - Role-based onboarding guide
- Architecture Documentation - System design and ADRs
- Development Guide - Contributing and development setup
- API Reference - API specifications and testing guides
- Go 1.21+ (if building from source)
- Terraform (for generating plan files)
- Cloud Provider Credentials (for syncing pricing data - see Credentials Guide)
See LICENSE file for details.