💸💰
Infrastructure cost estimation from Terraform plans and state files
OpenInfraQuote is a lightweight, open-source CLI tool for estimating infrastructure costs using Terraform plan and state files. It runs locally or in CI/CD. No backend, no API keys, no external services.
Built for teams that care about flexibility, privacy, and control.
- 100% open-source (MPL-2.0)
- No API keys or rate limits
- Self-contained CLI, data does not leave your system
- Works with your existing Terraform plans and state files
- Easy to integrate into any CI/CD pipeline
Currently supports AWS. GCP and Azure are on the way.
You can install OpenInfraQuote by downloading the binary.
Before running a cost estimate, download the latest pricing sheet:
curl -s https://oiq.terrateam.io/prices.csv.gz | gunzip > prices.csv
Download the latest release for your system:
-
Go to the OpenInfraQuote releases page.
-
Download the binary for your architecture.
-
Unarchive and copy it to one of the directories in your $PATH, e.g. /usr/local/bin
-
Confirm it’s working:
oiq --help
Automate your infrastructure cost estimates with OpenInfraQuote by adding the following step to your GitHub Actions workflow file:
- name: Run OpenInfraQuote
uses: terrateamio/openinfraquote-action@v1
with:
plan-path: tfplan.json
comment-on-pr: true
For more information, visit the OpenInfraQuote GitHub Action Marketplace page.
terraform plan -out=tf.plan
terraform show -json tf.plan > tfplan.json
oiq match --pricesheet prices.csv tfplan.json | oiq price --region us-east-1
Example output:
Match date: 2025-03-25T20:26:25
Price date: 2025-03-25T20:26:25
Match query: region=us-east-1
Min Price: 61.78 USD
Max Price: 63.85 USD
Min Price Diff: 61.78 USD
Max Price Diff: 63.85 USD
Resources
Name Type Min Price (USD) Max Price (USD) Change
example aws_s3_bucket 61.78 63.85 add
In JSON format:
oiq match --pricesheet prices.csv tfplan.json | oiq price --region us-east-1 --format=json
terraform state pull | terraform show --json > tfstate.json
oiq match --pricesheet prices.csv tfstate.json | oiq price --region us-east-1
By default, OpenInfraQuote shows pricing across all regions. If you know which region to use, pass it explicitly with the --region
flag. This is optional.
Plan and state files do not contain region information, so it must be provided manually if you want region-specific estimates.
Some cloud resources are priced based on usage, such as storage size or number of requests. OpenInfraQuote includes default estimates for common usage patterns to help provide directional cost data. You can customize these assumptions by providing your own usage.json
file.
See an example usage file here.
To run OpenInfraQuote with Docker:
docker run --rm -i \
-v $(pwd)/prices.csv:/prices.csv \
-v $(pwd)/tfplan.json:/tfplan.json \
ghcr.io/terrateamio/openinfraquote:latest \
match --pricesheet /prices.csv /tfplan.json \
| docker run --rm -i \
ghcr.io/terrateamio/openinfraquote:latest \
price --region us-east-1
Yes. There are no proprietary components or hidden features.
Currently AWS. GCP and Azure support is coming soon.
Estimates are based on pricing data from official cloud provider APIs. OpenInfraQuote uses a pricing sheet (prices.csv
) that is updated daily to reflect the latest public pricing. This file is downloaded and used locally, so your estimates stay current without needing a backend service.
Final costs depend on actual usage and any applicable discounts.