GithubHelp home page GithubHelp logo

standardgalactic / infracost Goto Github PK

View Code? Open in Web Editor NEW

This project forked from infracost/infracost

0.0 0.0 0.0 4.95 MB

Cloud cost estimates for Terraform in pull requests💰📉 Love your cloud bill!

Home Page: https://infracost.io

License: Apache License 2.0

Makefile 0.24% Go 96.35% Shell 3.23% Dockerfile 0.18%

infracost's Introduction

Infracost logo

Docs Community Slack channel Build Status Docker Image Tweet

Infracost shows cloud cost estimates for Terraform. It enables DevOps, SRE and engineers to see a cost breakdown and understand costs before making changes, either in the terminal or pull requests. This provides your team with a safety net as people can discuss costs as part of the workflow.

Infracost in GitHub Actions

Quick start

1. Install Infracost

Assuming Terraform is already installed, get the latest Infracost release:

macOS Homebrew:

brew install infracost

Linux/macOS manual download:

# Downloads the CLI based on your OS/arch and puts it in /usr/local/bin
curl -fsSL https://raw.githubusercontent.com/infracost/infracost/master/scripts/install.sh | sh

Docker and Windows users see here.

2. Get API key

Register for a free API key, which is used by the CLI to query our Cloud Pricing API, e.g. get prices for instance types. No cloud credentials or secrets are sent to the API and you can also self-host it.

infracost register

The key can be retrieved with infracost configure get api_key.

3. Run it

Infracost does not make any changes to your Terraform state or cloud resources. Run Infracost using our example Terraform project to see how it works:

git clone https://github.com/infracost/example-terraform.git
cd example-terraform/sample1

# Play with main.tf and re-run to compare costs
infracost breakdown --path .

# Show diff of monthly costs, edit the yml file and re-run to compare costs
infracost diff --path . --sync-usage-file --usage-file infracost-usage.yml

Screenshots of example outputs are shown below.

4. Add to CI/CD

Use our CI/CD integrations to add cost estimates to pull requests. This provides your team with a safety net as people can understand cloud costs upfront, and discuss them as part of your workflow.

Other CI/CD systems can be supported using our Docker images. If you run into any issues, please join our community Slack channel, we'd be happy to help!

CLI commands

The infracost CLI has the following main commands, see our docs for the other commands:

Show full breakdown of costs

Infracost breakdown command

Show diff of monthly costs between current and planned state

Infracost diff command

Supported clouds and resources

Infracost supports over 200 Terraform resources across AWS, Azure and Google. Other IaC tools, such as Pulumi, AWS CloudFormation/CDK and Azure ARM/Bicep are on our roadmap.

See this page for details on cost estimation of usage-based resources such as AWS Lambda or Google Cloud Storage.

Contributing

Issues and pull requests are welcome! For development details, see the contributing guide. For major changes, including CLI interface changes, please open an issue first to discuss what you would like to change. Join our community Slack channel, we are a friendly bunch and happy to help you get started :)

License

Apache License 2.0

infracost's People

Contributors

actions-user avatar adamconnelly avatar ajoulie avatar alikhajeh1 avatar aliscott avatar anton-yurchenko avatar bgrainger avatar chenrui333 avatar dependabot[bot] avatar dgcaron avatar ekifel avatar endriu0 avatar hassankhosseini avatar hugorut avatar kevinkengne avatar krishnaindani avatar m-yosefpor avatar neverovds avatar nissessenap avatar patmyron avatar pauluson avatar peterdavehello avatar praveenghuge avatar robh007 avatar sashman avatar sinabakh avatar theragus avatar tim775 avatar vdmgolub avatar xeger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.