Here's what we released in February - big thanks to the community contributors! You can upgrade to the latest version (v0.7.20) to pickup these goodies:
The CLI now only runs
terraform init if required since Terraform commands aren't the fastest in the world (init usually takes 20+ secs for me, but it depends on how many plugins you have). Furthermore, calls to the Cloud Pricing API have been switched from sequential to parallel. Infracost should run much faster than before.
Depending on your Terraform workflow, you'll run Infracost with different options. Things can get complicated when you have multiple projects in a repo, each requiring their own Terraform variables. For example, if you have two workspaces and want to see their total cost estimate, you would run something like this:
You can now create an
infracost.yml config file in your repo to describe your setup, then just run
infracost --config-file infracost.yml.
Infracost now integrates with Atlantis, which is a popular CI/CD tool that enables Terraform pull request automation.
You can now get the monthly cost diff from the Infracost JSON output, e.g. the following shows the monthly cost is going to be increased by $1530 if the Terraform plan is applied. You can also get
totalHourlyCost, or add
--no-color=true --log-level=warn if you don't want the spinners/logs/color.
We also shipped support for the following cloud resources:
- AWS: Config, ECS on EC2, EventBridge, Route 53 Resolver, CodeBuild
- Google: Key Management Service (KMS), Google Cloud Functions
- Azure: great progress is being made, stay tuned for exciting news soon
The usage file params for Google Cloud Functions are pretty cool; as shown below you can define 3 simple params and we'll estimate the cost for you, no need for you to decode how function memory maps to GHz-seconds and rounding.
As always, looking forward to your feedback (email@example.com).