In the rapidly evolving world of FinOps, the ability to forecast cloud costs before deployment is paramount. While commercial tools have led the charge, a growing demand for open-source, self-contained solutions has emerged. Answering this call is OpenInfraQuote, a lightweight, MPL-2.0 licensed command-line interface (CLI) tool designed to estimate infrastructure costs directly from Terraform files. Built by Terrateam, it offers teams a way to gain cost visibility without vendor lock-in, API keys, or external dependencies.
The Philosophy Behind OpenInfraQuote
The creators of OpenInfraQuote built it with a clear set of goals centered on developer freedom, privacy, and control.
100% Open Source and Control: With an MPL-2.0 license, the tool is free from restrictive commercial licensing. Users have full control over the code and its usage.
Simple and Lightweight: OpenInfraQuote is a self-contained CLI binary. It runs locally or in any CI/CD environment without requiring a backend, external services, or API keys. This means your data never leaves your system.
Extendable by Design: The tool is built to be easily integrated into existing pipelines and expanded upon based on community needs.
This approach is ideal for teams that prioritize data privacy, operate in air-gapped environments, or simply prefer the transparency and control that open-source software provides.
How OpenInfraQuote Works
OpenInfraQuote calculates infrastructure cost changes by analyzing the JSON output from Terraform plan and state files. This reliance on structured JSON output ensures stability and consistency in its estimates. The process involves two main commands piped together: oiq match and oiq price.
oiq match: This command takes a pricing sheet and a Terraform plan/state JSON file as input. It matches the resources defined in the JSON file with the corresponding price points from the pricing sheet.oiq price: This command takes the output ofoiq matchand calculates the final cost estimate, applying region-specific pricing and usage data.
Getting Started: A Step-by-Step Guide
Step 1: Installation
First, you need to install the oiq binary and download the cloud provider pricing sheet.
Install the oiq CLI: Go to the OpenInfraQuote GitHub releases page and download the appropriate binary for your system. Unarchive the file and move the
oiqexecutable to a directory in your$PATH.Shell
# Example for macOS curl -LO https://github.com/terrateamio/openinfraquote/releases/download/v1.10.0/oiq-darwin-amd64-v1.10.0.tar.gz tar -xzf oiq-darwin-amd64-v1.10.0.tar.gz sudo mv oiq /usr/local/bin/ sudo chmod +x /usr/local/bin/oiqVerify the installation by running
oiq --help.Download the Pricing Sheet: Before running an estimate, you must download the latest pricing data.
Shell
curl -s https://oiq.terrateam.io/prices.csv.gz | gunzip > prices.csvThis
prices.csvfile should be available to theoiqcommand during execution.
Step 2: Generate a Terraform Plan JSON
OpenInfraQuote operates on the JSON representation of a Terraform plan.
Navigate to your Terraform project directory and initialize it.
Shell
terraform initCreate a binary plan file.
Shell
terraform plan -out=tf.planConvert the binary plan to a JSON file.
Shell
terraform show -json tf.plan > tfplan.jsonYou now have the
tfplan.jsonfile that OpenInfraQuote will analyze.
Step 3: Run the Cost Estimation
With the setup complete, you can now generate a cost estimate.
Shell
oiq match --pricesheet prices.csv tfplan.json | oiq price --region us-east-1
The --region flag is recommended for region-specific estimates. You can also get the output in JSON format by adding --format=json to the price command, which is ideal for CI/CD automation.
Handling Usage-Based Resources
For resources priced based on usage (e.g., storage size), OpenInfraQuote includes default estimates. However, you can provide your own usage.json file to customize these assumptions and achieve more accurate estimates.
Integrating into CI/CD
OpenInfraQuote is designed for easy integration into any CI/CD pipeline, such as GitHub Actions, GitLab, or Atlantis. The process typically involves adding steps to your pipeline to install oiq, download the pricing sheet, generate the plan JSON, and execute the cost estimation command. The output can be used to post a comment on a pull request or fail the pipeline if a cost threshold is exceeded.
Conclusion
OpenInfraQuote offers a compelling vision for the future of open-source FinOps. By providing a simple, secure, and self-contained CLI tool, it empowers teams to gain critical cost visibility without compromising on privacy or control. Its transparent, community-driven approach and ease of integration make it an excellent choice for any organization looking to build a cost-aware culture on its own terms.
All in One Place
Atler Pilot decodes your cloud spend story by bringing monitoring, automation, and intelligent insights together for faster and better cloud operations.

