Mozilla Public License 2.0

项目介绍

terrateamio/openinfraquote 是一个托管在 GitHub 上的开源项目,主要使用 OCaml 编写,采用 Mozilla Public License 2.0 许可证,目前获得 319 个 Star、21 次 Fork。

仓库全名
terrateamio/openinfraquote
开源许可证
Mozilla Public License 2.0
Star 数
319
Fork 数
21
未关闭 Issue
14

README 摘要

💸💰 OpenInfraQuote 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. Why OpenInfraQuote 100% open-source (MPL-2.0) No API keys or…

完整内容见 GitHub 原始 README 或本页 。

常见问题

openinfraquote 用什么语言开发?

主要使用 OCaml 编写,采用 Mozilla Public License 2.0 许可证,目前有 319 个 Star。

openinfraquote 可以免费商用吗?

仓库标注的许可证为 Mozilla Public License 2.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 openinfraquote 的源码?

可以直接克隆仓库:git clone https://github.com/terrateamio/openinfraquote.git,默认分支为 main;安装与运行步骤见仓库 README。

openinfraquote 最近还在维护吗?

仓库最近一次更新为 2025年12月22日,当前有 14 个未关闭 Issue;Star 数为 319,可作为社区活跃度的参考。

关于

Fast, open-source tool for estimating infrastructure costs from Terraform plans and state files

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

Dockerfile
Makefile
OCaml

Release

README

💸💰

OpenInfraQuote

Comedian, Chelsea Lately, faces the camera and says, "I am a bold artistic voice", with a brief pause before saying, "with a lot of credit card debt"

Infrastructure cost estimation from Terraform plans and state files

Stars Slack Latest Release Docs OCaml License: MPL-2.0


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.


Why OpenInfraQuote

  • 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.


Documentation

Full documentation is available at openinfraquote.readthedocs.io

Includes:

  • Installation guides
  • CI/CD integrations
  • Cost diffing
  • Usage customization
  • Output formats
  • Policy enforcement with OPA

Getting Started

You can install OpenInfraQuote by downloading the binary.

Download Pricing Sheet

Before running a cost estimate, download the latest pricing sheet:

curl -s https://oiq.terrateam.io/prices.csv.gz | gunzip > prices.csv

Install OpenInfraQuote

Download the latest release for your system:

  1. Go to the OpenInfraQuote releases page.

  2. Download the binary for your architecture.

  3. Unarchive and copy it to one of the directories in your $PATH, e.g. /usr/local/bin

  4. Confirm it’s working:

    oiq --help
    

Examples

Estimate Costs from a Terraform Plan

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:

💸 OpenInfraQuote: Monthly Cost Estimate

Monthly cost increased by $25.00 📈

Before: $63.85 - $63.85
After:  $88.85 - $88.85

🟢 Added: 1   🔴 Removed: 0    ⚪ Existing: 1

Added resources:
 Resource                                                       Monthly Cost
 ------------------------------------------------------------+--------------
 aws_db_instance.example-db                                     $25.00

Existing resources:
 Resource                                                       Monthly Cost
 ------------------------------------------------------------+--------------
 aws_s3_bucket.example-bucket                                    $63.85

In JSON format:

oiq match --pricesheet prices.csv tfplan.json | oiq price --region us-east-1 --format=json

Estimate Current Costs from Terraform State

terraform state pull | terraform show --json > tfstate.json
oiq match --pricesheet prices.csv tfstate.json | oiq price --region us-east-1

Region and Usage Configuration

Region Handling

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.

Usage-Based 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.


Running with Docker

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

FAQ

Is OpenInfraQuote 100% open-source?

Yes. There are no proprietary components or hidden features.

Which cloud providers are supported?

Currently AWS. GCP and Azure support is coming soon.

How accurate are the estimates?

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.

Where can I report issues or request features?

Open an issue on GitHub or join our Slack community.

评论

暂无评论