September 2021: Fetch usage from CloudWatch & less noisy GitHub comments

We released Infracost v0.9.9 recently, you can upgrade to use these features.

Fetch usage from CloudWatch#

When it comes to estimates for resources where the cost fully depends on usage (e.g. AWS S3 or Lambda), we have a usage file, in which users can define how much of those resources they will use. This requires you to manually input the usage numbers. We're now experimenting with fetching the values from CloudWatch or other cloud APIs when --sync-usage-file is used. This enables you to quickly see what the last 30-day usage for those resources have been and adjust if needed. If the CLI can fetch the following values from CloudWatch, it will overwrite them in the usage file.

  • aws_dynamodb_table: data storage, read capacity and write capacity units
  • aws_lambda_function: function duration and requests
  • aws_instance, aws_autoscaling_group, aws_eks_node_group: operating system (based on the AMI)

Please use this GitHub discussion to let us know if you find this useful or have feedback.

Less noisy GitHub PR comments#

We have heard from some users that leaving a new comment every time something is changed, makes Infracost PR comments too noisy. We have added a new post_condition option '{"update": true}' which should help. For our GitHub-based CI/CD integrations (GitHub Actions, Azure DevOps with GitHub repos, and CircleCI with GitHub repos) when a commit results in a change in cost estimates vs earlier commits, the integration will create or update a PR comment (instead of commit comments). The GitHub comments UI can be used to see when/what was changed in the comment. PR followers will only be notified on the comment create (not update), and the comment will stay at the same location in the comment history.

This new post_condition is an addition to the existing ones: has_diff, always and percentage_threshold. Please use this GitHub discussion to tell us what you'd like to see in PR comments.

GitHub create or update comments

A few more improvements#

We merged 33 pull requests and closed 20 issues in September, I wanted to highlight a few of these improvements:

  • Added support for google_compute_instance_group_manager and google_compute_region_instance_group_manager, azurerm_bastion_host and azurerm_postgresql_flexible_server (v4).
  • Improved Terragrunt project detection logic.
  • Free resources can be seen when running the CLI with the --log-level debug flag, look for "Skipping free resource" lines. This helps users debug issues with supported resources.

Seed funding#

We announced our $2.2M seed funding from Sequoia, Y Combinator, SV Angel and Yun-Fang Juan as an angel investor. Bogomil Balkansky (our partner at Sequoia) wrote a blog about why they invested in Infracost.

A huge thank you to our amazing open source community of users and contributors for helping us reach this milestone.

Community#

The community has been writing some awesome content around Infracost, and I'd like to give them a shout-out here:

  • Joe (Solutions Architect at GitLab) recorded a video demo of how you can create cloud costs estimates with Terraform, Infracost, and GitLab CI.
  • Russ (Practice Manager of SRE & DevOps at N4Stack) wrote a detailed blog about tracking costs in Terraform using Infracost.
  • Thiago (Cloud DevOps Eng at Dock) wrote a great intro blog for our Brazilian community: estimativa de custo para o Terraform com Infracost.
  • Hassan, our co-founder, went on The Production-First Mindset podcast to talk about the complexity of cloud pricing and our open source approach.

Up next!#

We're focusing on usability improvements, for example by generating the usage file with commented-out 0 values and skipping 0-usage line items in breakdown output. Checkout our project board to see what else is in flight.

We're glad to see our community growing; it's been awesome to hear your feedback on features and discuss how you're handling cloud costs as part of your workflows. Message me on Slack or Twitter if you have any questions!