Show HN: Infracost (YC W21) – Open-source cloud cost policies
github.comHi, we’re Ali, Hassan and Alistair, co-founders of Infracost (https://www.infracost.io/). Infracost shows engineers the cost of each Terraform change in CI/CD before resources are launched. When something changes, it posts a comment with the cloud cost impact. e.g. you’ve added 2 instances and volumes, and have changed an instance type from medium to large, this will increase your bill by 25% next month from $1000 to $1250 per month.
We launched the first version of Infracost just under a year ago (https://news.ycombinator.com/item?id=26064588). As we said in our first release ‘the people who are purchasing cloud resources are not shown costs upfront, so they don’t know how much the resources will cost before launching them’. Our assumption was that because we are open source and engineers are flying blind, they (the engineers) would pull us into their workflow. Actually, something different is happening:
The engineers are not pulling us in - it turns out to be the senior DevOps, SREs and platform teams. One of their challenges is figuring out how their small team of 7 people can fulfill the infrastructure requirements of hundreds of engineers. To solve this, they have created and put in place processes for engineers to provision infrastructure when they need. Now they want to implement cost policies and guardrails so that these hundreds of engineers don’t blow past all budgets. For example, if a change will result in a higher than 15% increase, leave a warning. If a change results in a >25% increase in costs, block the change till a team lead has reviewed it.
This has two implications for us. First, we need to create an output that isn’t only used by humans but is also digested into other systems to make further decisions. The second is the people we have been speaking to are not our end users. We need to figure out how we can get introduced to our end users, and create a different set of questions for each persona.
We’d really love your feedback around the cost policies use-case. We've created examples with standard policy tools like Open Policy Agent (OPA), HashiCorp Sentinel and Conftest. Check out the repo for GitHub Actions at https://github.com/infracost/infracost. Our other CI/CD integrations are listed here: https://www.infracost.io/docs/#4-add-to-cicd.
We'd love to hear how you think about policies and guardrails for containing cloud costs! Congrats on the launch! Just wanted to chime in and give you folks some props, I've been using infracost for a few months as a one-man infra team for a small nonprofit I volunteer with. It was super easy to get set up in our CI pipelines in an afternoon, and it makes it much easier for the devs I work with to figure out what their cost impact is. A great product and a great team! Thanks Jesse! I appreciate the love. Always around if there is anything me or the team can help with; questions, comments, issues, no matter how big or small :) Congratulations on the growth, Infracost team. I felt using Terraform PR to estimate costs via Github bot is very smart. I've added Infracost to my curated list of startup tools at StartupToolchain[1]. Tangentially, I would like to pick your brain on some related need-gaps if you don't mind; 1. Once during a conversation with GCP sales team(Initiated by them), I sent them a monthly AWS bill (~$ 1000) and asked them to revert back with equivalent services of GCP for each AWS service I'm using with their pricing. I never heard from them again. This seems like an obvious question for someone to migrate from one cloud infrastructure to another; Do you think there is a need for cost-estimate calculators for migrations which can take in my current bill and spit out estimated bill of another IaaS? 2. Are are there any cost-estimate calculators for calculating the cost for AWS after the free-12 months?[2] [1] https://startuptoolchain.com/#cloud [2] https://needgap.com/problems/277-what-will-be-my-aws-bill-af... Thanks! 1. I suspect there might be the need for migration calculators but for smaller bills, the cost of the actual migration might be more than the cloud bill savings. For larger bills, it'll depend on the discounts and custom prices the vendors are offering them. 2. If I remember correctly, AWS Cost Explorer has a filter to remove the free tier usage, or maybe that's the credits? That might help to see what the costs will be. Congrats on the launch! > The second is the people we have been speaking to are not our end users. We need to figure out how we can get introduced to our end users, and create a different set of questions for each persona. I'm not exactly clear on what you are trying to say in the quoted text. Perhaps it is because of how you've framed it? Both the senior and junior folks are end users, it's just their role aka personas that are different, no? Thanks! There are two group of people: the integrators (DevOps/SRE/platform engs) who are pulling Infracost into the company workflows, and the engineers who are seeing the actual output of Infracost (the pull request cost comment). We'd love to hear from the engineers so we can also improve cost estimate output, and see how we can help the communication between the integrators and engineers (also finance later on). So you've been speaking to the first group and need a way to speak to the second group, got it, thanks. A couple of questions: 1. It seems your product is proactive with respect to cloud costs while Vantage, CloudForecast etc are more on the reactive side of the spectrum? 2. I imagine that relative to Infracost, a cloud asset management tool like CloudQuery https://github.com/cloudquery/cloudquery would also fit in the reactive bucket? 1. Exactly! We built one of the early cloud cost management products before EC2 had cost explorer (it was called RightScale Cloud Analytics) and spent years working on the reactive approach. We're now bringing costs into the dev workflow, in the same way that security tools like Snyk have switched the focus to proactive. 2. Yep, those tools query the cloud APIs for existing resources. Meaning they have to have been launched (and already costing money) to be discovered. Appreciate the shout out and your assessment is pretty spot on w/ #1 (I am one of the co-founders of CloudForecast). We're actually huge fans of Infracost and what they've done so far. They've built an amazing tool for eng teams, who should always be the lead when it comes to managing cloud cost. We actually have a few customers using them along side us as well. Congrats on launch, Ali, Hassan and Alistair! Thanks! Hey team, Congrats on building something great. I've dealt with teams in the past that got very strict with cloud costs, and I wish I had a tool like infracost when I was on those teams. In fact, I started building an MVP for a very similar tool before I heard about infracost. How difficult was it to build your pricing pipeline in the beginning? When I was building my tool, just getting and organizing the cloud prices from the major cloud providers was the biggest hurdle that prevented me from moving forward. I can't imagine what it was like for your team to build the MVP. It's unbelievable how opaque these providers make a lot of their pricing. Thanks again for building such a useful tool! Thanks! Cloud pricing is messy for sure. This blog describes the Cloud Pricing API: https://www.infracost.io/blog/cloud-pricing-api/ it's the 3rd one our team has built in the last 10 years. The Infracost CLI uses the GraphQL API from this service to retrieve prices. it's just sad, that the clouds make this so complicated. they could easily publish data per month how much something costs in a json or xml file format. but it seems to much to be of an advantage not to publish cloud costs. The complexity is crazy for sure. Around 10 years ago I started looking at cloud costs as part of my PhD - back then there were around 10,000 price points that I was scraping manually, today there are more than 3 million prices between AWS, Azure and Google that we're fetching in https://github.com/infracost/cloud-pricing-api I just came here to say that Infracost is an awesome tool that has great potential. Thank you! I wish I could add gifs in HN haha dancing around gif Congrats on the Show HN! I can confirm Infracost is very easy to integrate with various automation as we’ve been able to implement it in Spacelift[0] using their CLI tool and even integrated[1] it into our OPA-based policy system. Great stuff, and makes this use case so much simpler to accomplish. (Imagine having to scrape cost data from various providers yourself, ugh.) Keep it up! Woohoo, thank you.
The Spacelift integration is sweet and super easy to use. It's been great working with you and more to come :) This looks very cool. I'll definitely see if it works for us (we have a mix of Terraform and CloudFormation). Awesome! Let me know how it goes :) We also have CloudFormation in our target: https://github.com/infracost/infracost/issues/190 Cool product! Easy way to understand cost and impact of changing our infra size. Thanks! Terraform Cloud has cost estimation built-in, but, in my experience, it's broken. It’s hard work to do the mappings between cloud pricing web pages and terraform resource params. It took us a week to do it just for S3, which has 50+ cost components. We have a community who are adding the mappings, we’ve developed guidelines and automated tests for them too. We now cover over 200 resources. Since then, we have partnered with Hashicorp to build out their Run Tasks feature. It's still in beta, but more info about it here: https://www.hashicorp.com/blog/terraform-cloud-run-tasks-bet... I saw that, thank you, unfortunately, we Terraform our Terraform Cloud and beta features are not available in the TFE provider, so, we need to wait for the beta label to get removed from it. Not sure why HashiCorp decided not to include beta feature in their APIs - it looks like a very poor choice! We couldn't wait either so we talked with other TFE users who were using Infracost and we learned from them to make an example of how to run it with GitHub Actions: https://github.com/infracost/actions/tree/master/examples/te... We have similar examples for GitLab (https://gitlab.com/infracost/infracost-gitlab-ci/-/tree/mast...) and Azure DevOps (https://github.com/infracost/infracost-azure-devops/tree/mas...). Happy to help with any issues via infracost.io/community-chat Looks great! Love the OPA integration. Thanks, I appreciate the love <3 We love OPA :)