10 ms·
Show HN: See the impact on your cloud costs as you code
Hey folks, my name is Owen and I recently started working at a startup (https://infracost.io/ https://infracost.io/) that shows engineers how much their code changes are going to cost on the cloud before being deployed (in CI/CD like GitHub or GitLab). Previously,
I was one of the founders of tfsec (it scanned code for security issues). One of the things I learnt was if we catch issues early, i.e. when the engineer was typing their code, we save a bunch of time.
I was thinking … okay, why not build cloud costs into the code editor. Show the cloud cost impact of the code as the engineers are writing it.
So I spent some weekends and built one right into JetBrains - fully free - keep in mind it is new, might be buggy, so please let me know if you find issues. It is check it out: https://plugins.jetbrains.com/plugin/24761-infracost https://plugins.jetbrains.com/plugin/24761-infracost
I recorded a video too, if you just want to see what it does:
https://www.youtube.com/watch?v=kgfkdmUNzEo https://www.youtube.com/watch?v=kgfkdmUNzEo
I'd love to get your feedback on this. I want to know if it is helpful, what other cool features we can add to it, and how can we make it better?
Final note - the extension calls our Cloud Pricing API, which holds 4 million prices from AWS, Azure and GCP, so no secrets, credentials etc are touched at all.
If you want to get the same Infracost goodness in your CI/CD, check out https://www.infracost.io/cicd https://www.infracost.io/cicd
- bearjaws 2y agoThis is amazing, I think it's best applied at CI/CD first, but having the plugin is good too for ICs to get it into a company. How "smart" is it? Say I make a copy of a large database in TF and redeploy it into a staging env, will it know that the storage is $200 a month? Also maybe put the supported clouds on the front page? I work multi-cloud so was worried it was only AWS.
- rumno0 2y agoHey - great feedback!! If you're using tfvars for your envs, its "smart". With easily inferable env names for tfvars, we will generate estimations for each env. In the video, I give an example where for the prod env, I turn on multi-az and have a larger storage and the price goes up. Good suggestion about supported clouds, I'll update!
- manmal 2y agoLooks great! The markdown link to your site is broken.
- rumno0 2y agoAll fixed, appreciated!
- Namret 2y agoThe main page doesn't mention Terraform explicitly (except for the user feedback section). Are there plans to make this compatible with e.g. AWS CDK or Pulumi?
- rumno0 2y agoYes, we have got quite a lot of requests for those. On the roadmap for sure!
- fulafel 2y agoCould similar be done for co2 emissions?
- ctxc 2y agoIf I may dare - that would be a novelty while this is something many would pay for. If it's just a straightforward conversion, then sure...
- rumno0 2y agoThere was an interesting page on the FinOps Foundation site about this https://www.finops.org/wg/sustainability/ https://www.finops.org/wg/sustainability/ There is a potential intersection, but that might have to go further down the roadmap
- geewee 2y agoSomething similar (but not quite the same) exists through sources like CCF ( https://www.cloudcarbonfootprint.org/ https://www.cloudcarbonfootprint.org/ ) or Climatiq ( https://www.climatiq.io/docs/api-reference/computing https://www.climatiq.io/docs/api-reference/computing ) thought I don't think anyone has anything built-in to Terraform or your editor, which would be neat. Disclaimer: I work at Climatiq
- eloisant 2y agoUsually CO2 emissions correspond to cloud costs. Optimize your cloud costs, you optimize your emissions.
- fulafel 2y agoThis spiritual kin of the efficient market hypothesis mindset. But it's not like that, if you look at pricing at cloud provider regions and vs local electricity mix off Electricity Maps. (eg Ireland vs nordic countries)
- paxys 2y agoI was half hoping this would tell me how many dollars worth of CPU cycles my shitty code was wasting for no reason.
- rumno0 2y agoThat sounds like an idea for my next plugin :thinking:
- deleted 2y ago[deleted]
- selamtux 2y agothat what i thinking, after some job interview i realized nobody gives a shit how many cpu cycle you use, they only care about jira points.
- johnisgood 2y agoSo true.
- ai4ever 2y agoThis is nice but not very useful to me. What would be more useful in my use case is tooling to audit my cloud accounts periodically and reclaim garbage which is not used or re optimize my usage (smaller instances or databases depending on usage patterns) which directly saves me money.
- rumno0 2y agoI think this is the next natural evolution - bring in usage information directly from the cloud accounts then offer right-sizing suggestions and, like you say, reclaim garbage on demand. Definitely one for the road map!
- Gasp0de 2y agoDetermining accurately if we can safely scale down an instance is one of the hardest things we do, I can not think of a way to determine this in an automated fashion.
- nathanwallace 2y agoFor runtime cost analysis, you could try Steampipe [1] with it's Powerpipe "thrifty" [2] mods. They run dozens of automatic checks across cloud providers for waste and cost saving opportunities. If you want to automatically make these changes (with optional approval in Slack) you can use the Flowpipe thrifty mods, e.g. AWS [3]. It's all open source and easy to update / extend (SQL, HCL). 1 - https://github.com/turbot/steampipe https://github.com/turbot/steampipe 2 - https://hub.powerpipe.io/?objectives=cost https://hub.powerpipe.io/?objectives=cost 3 - https://hub.flowpipe.io/mods/turbot/aws_thrifty https://hub.flowpipe.io/mods/turbot/aws_thrifty
- deleted 2y ago[deleted]
- denvrede 2y agoDoes it have Terragrunt (*.hcl) support? I see it mentioned no where but the infracost CLI has (https://www.infracost.io/docs/features/terragrunt/ https://www.infracost.io/docs/features/terragrunt/).
- jiehong 2y agoCongrats! It's almost a REPL for cloud costs! Amazing!
- rumno0 2y agoThanks!!
- da768 2y agoDo you plan to take discounts into account? Can you base usage off previous billing data for existing resources?
- rumno0 2y agoWe support custom price books - https://www.infracost.io/docs/infracost_cloud/custom_price_books/ https://www.infracost.io/docs/infracost_cloud/custom_price_b... As for usage, at the moment it's driven from a usage file - https://www.infracost.io/docs/features/usage_based_resources/#infracost-usageyml https://www.infracost.io/docs/features/usage_based_resources... In the future, we'd like to infer usage directly from the cloud account to give the most accurate view and do right size suggestion
- rbro 2y agoLooks great based on the video! As a data engineer in a consulting company: this would be a good way to get an idea of cost once we've written infra for projects. Couple of questions: 1. Is Bicep supported? 2. Any plans for a VS Code plugin? (I just saw in your docs you have a plugin for this, great!) 3. How are you handling pricing of resources that are dependent on consumption?
- rumno0 2y ago1. Not at the moment, but we're looking at other IaC tools to support on the road map. 2. There is a vscode extension - https://marketplace.visualstudio.com/items?itemName=Infracost.infracost https://marketplace.visualstudio.com/items?itemName=Infracos... 3. That is a challenge, we use usage files, but in the future would like to pull it from the cloud account to be more accurate and the best suggestions. https://www.infracost.io/docs/features/usage_based_resources/ https://www.infracost.io/docs/features/usage_based_resources...
- mrg3_2013 2y agoLooks interesting! I think cost of running resources would be more helpful
- rumno0 2y agoThanks, that's generally more readily available in the billing explorer for most cloud providers. There is a definite case for pulling usage data from the cloud account to make suggestions about right sizing though, that's a definite roadmap item
- xhkkffbf 2y agoHow crisp are the estimates of cost? I can see how they might depend heavily upon the dataset, especially when the algorithms are supralinear like O(n^2) or O(n^3).
- rumno0 2y agoOur cost api is very regularly updated from the pricing data made available by the cloud providers. Metadata about the resources that require cost estimation are rolled up and sent to the pricing API, it's generally pretty quick process even with large projects
- jbs789 2y agoI have more macro questions about this. Sometimes I find engineers aren’t best placed to evaluate cost at all. What might be perceived as expensive (say relative to a salary) is not expensive at all in the context of the business problem being solved. Think there’s a book called “measure what matters” and the idea is what we measure shapes companies and behaviour. So I’d be very careful about implementing anything like this in my org.
- rumno0 2y agoYou're right, there are multiple roles for FinOps in an organization from the engineer up to finance and engineering management. This is tackling one aspect of this - highlighting the cost to the engineer.
- mhuffman 2y agoWhy not provide it to them all then? Have you considered piping your results to a (possibly cloud hosted) dashboard that might offer (possibly aggregated) real-time cost estimates to people higher up the corporate chain? A high-level view of the cost of what is being created, if you will.
- rumno0 2y agoThis is effectively what Infracost Cloud is (https://www.infracost.io/ https://www.infracost.io/) It adds things like management of guardrails and policies that can be maintained by a finops role, or engineering manager. PRs can block or notify if thresholds are going to be breached by a specific PR.
- delusional 2y agoI'd be careful about implementing it without the appropriate support at least. The cheapest option is to do no work, that's not going to get you very far. The cost of the infra always has to be held up against the value of the product.
- gopher_space 2y ago
- purple-leafy 2y agoGood idea mate. This is the kind of thing that should have heaps of users. I wanted to watch the YouTube video but I didn’t have access to audio, and gave up. Video took to long and had too few visual cues - I think many people will do the same. So you should make a super short gif (10-20 seconds max) that gets the point across extremely fast and visually - no audio. Post it on Reddit on webdev, you’ll get a shit tonne of people installing this. I’ve had lots of success with this simple method (sold a personal project with 700,000 users)
- rumno0 2y agoThanks for the feedback - appreciate the comments on the video, I can see that without audio the first minute or so is a bit dull - Hope this Gif is clearer - https://github.com/infracost/jetbrains-infracost/blob/244ee84090f401f027c5e06bcfd98492339570a8/.github/images/jetbrains-infracost.gif https://github.com/infracost/jetbrains-infracost/blob/244ee8...
- purple-leafy 2y agoIt’s much improved! My last feedback would be to zoom your editor a lot more so folks on mobile can see things better :)
- mathverse 2y agoDo you have some testimonials from customers to show us how do they use it and what value do they get out of it? In my org 50k-100k cloud bill I don't see that much use for it (mainly we are not increasing our costs significantly and we roughly know what we are paying for). I can see a lot of value for indie/small/medium sized biz but the commercial of that is too high in my opinion.
- rumno0 2y agoHey, thanks for the question - Infracost does three things at the moment: Cost estimation before code is merged (and this is what is in JetBrains now with this plugin); then it checks the code for best practices being followed (like if the code is using old instance types, or old volume types, or there is no retention policies in place etc), it will tell the engineers exactly how to fix those. and finally, it also checks to make sure all resources are tagged properly both with the key and value being checked. Again it tells the engineer how to fix it if there isn an issue. So overall, the two main benefits are cost avoidance, and then engineering time saving or toil reduction, since all the issues get fixed before the code is merged. The product is being used by over 3,000 companies now in CI/CD; we have a few case studies on the website: https://www.infracost.io/safe-fleet/ https://www.infracost.io/safe-fleet/
- nsonha 2y agoThis is nice but tackle it this ways might be unnecessarily complicated. I don't always need to look at the cost while writing code and it could fail to track, say, resources dynamically created with something like CDK. More useful for me would be to plug directly into the account OR to analyse the cloud formation template, which can be easily obtained regardless of the IaC you're using.
- rumno0 2y agoThe next step is certainly to look at the cloud account to get information on usage - this completes the picture of both for intended resources to create and what is already there. Thanks for the feedback
- lazzurs 2y agoI've been an early user of Infracost and I cannot recommend it enough. It being in the CI/CD system is good but it being in the IDE is excellent. Cost is an important architecture concern and yet it's one of the most opaque things to deal with. This IDE plugin for Infracost fixes cost being opaque. Excellent work, thanks for this.
- rumno0 2y agoGreat feedback - thanks
- itaysk 2y agoHi Owen! This is Itay from Aqua, what a lovely surprise stumbling across this post :) This looks awesome, congrats and good luck
- rumno0 2y agoHey Itay, thanks, and thanks for commenting, great to hear from you!!
- eitally 2y agoThis seems to be solving a problem that most enterprise software engineers don't have. If you're at a large company that has already chosen its preferred cloud, you're probably already spending $xxM+ with them annually and you probably get CUDs & other incentives to keep your business growing with them. That said, I've never personally seen any cloud project where there wasn't a business case review that didn't include a review of architectural plans/assumptions and expected cloud service consumption profiling. I think what's different here is that you can help engineers close a feedback loop that is often left open between when a project is planned & scoped and when 1) the landing zone (or data pipelines) is created, and 2) when the app/system is moved from test/QA into production. This could be helpful for the project/product manager, especially, because anything that looks out of whack with the forecast should be escalated promptly.
- rumno0 2y agoTo a certain extent I agree - I've worked on projects where a resource amounts to a rounding error in the overall cloud bill; for many organizations, cost is an important NFR for a project. Going off the other threads of this post, how much engineers should know or care about billing seems to be open for debate; I think an engineer needs to appreciate that often cost is one of the many trade-offs that need to be accounted for
- blorenz 2y agoI just installed to test this out and my cost isn't being calculated at all. I took a ekctl yml file and had chatGPT convert it to a terraform file; the terraform file validates; but nothing is discovered by Infracost plugin. I have it off my <project root>/deploy/terraform/. I wish there was some more feedback from the plugin why it cannot locate or visualize my cost.
- rumno0 2y agoI just gave this a try with https://github.com/eksctl-io/eksctl/blob/main/examples/01-simple-cluster.yaml https://github.com/eksctl-io/eksctl/blob/main/examples/01-si... ChatGPT gave me a decent chuck of terraform and running Infracost against it gave me a $515 monthly cost. If you go to the settings of the plugin and get the absolute path of infracost binary then run infracost breakdown --path . in the dir with the terraform, does it give you a breakdown?
- saadatq 2y agoWould love to see a plugin/adapter for Snowflake. BigQuery has a neat feature where it estimates the cost __before__ you run a query, which has often come in handy.
- yuliiatkachova 2y agoHey, we do cool stuff with gbq billing, which helps reduce computing costs. Basically, we show how much money every pipeline costs coming in BQ, executed in BG, or leaving it. We do not query your data (do not need permission to read or edit). Everything is done using GBQ logs. I mean, we do not use your information_schema either. What we saw from our clients is at least 10% compute cost reduction in 10-30 days after deployment. Happy to give a fee trial to test it out. Here is one of the examples https://mastheadata.com/yalos-cost-management-blueprint-elevating-google-bigquery-efficiency-with-masthead-data/ https://mastheadata.com/yalos-cost-management-blueprint-elev...
- zephyra334 2y ago[dead]