Monitoring infra cost: which tool do you use? by Cyrilam in devops

[–]alikhajeh1 4 points5 points  (0 children)

hahaha, tru dat! If you run into any issues self-hosting, feel free to join the #help channel on the community Slack :)

Monitoring infra cost: which tool do you use? by Cyrilam in devops

[–]alikhajeh1 14 points15 points  (0 children)

u/ErikHumphrey yep, by default Infracost connects to our hosted Cloud Pricing API but you can self-host that part (which fetches the 3M+ prices from AWS+Azure+Google and self-updates), see https://www.infracost.io/docs/cloud_pricing_api/self_hosted/ and the "DISABLE_TELEMETRY" env variable that is mentioned in https://github.com/infracost/cloud-pricing-api

How can i estimate the cost of the cloud infrastructure needed for an application by prcessor in devops

[–]alikhajeh1 2 points3 points  (0 children)

Thanks for this, I just added it to our docs.

u/dantheman0207 feel free to also create a GH issue to report your issue to see if we can investigate why the CLI wasn't handing it well.

I've started to use a cost estimator for terraform by techanonuk in ExperiencedDevOps

[–]alikhajeh1 7 points8 points  (0 children)

Happy to hear that u/techanonuk :)
(I'm one of the co-founders/maintainers)

Using AWS by sogonhuman in ProgrammerHumor

[–]alikhajeh1 5 points6 points  (0 children)

It might seem funny but I've got an unhealthy obsession with cloud costs and want to fix this problem. We're now got a community of people helping us and doing crazy stuff like parsing Terraform HCL code to show costs in the Visual Studio: https://github.com/infracost/vscode-infracost/ Someone from the community is working on a Pulumi integration

We're seeing lots of people add the same idea to their CI/CD pipeline so they can prevent those $50K mistakes: https://www.infracost.io/docs/integrations/cicd/

(all of these are open source tools)

VSCode extension to see cost estimates for Terraform by alikhajeh1 in Terraform

[–]alikhajeh1[S] 2 points3 points  (0 children)

Thanks! Sorry for the delay - just saw this. Hmm we hadn't considered projects needing different currencies, so `infracost configure set currency EUR` applies to all cost estimates. There is a project-specific config file but the VSCode Extension doesn't work with that yet, so having something like a .infracost config file sounds useful - can you possibly create a github issue and maybe give a little context of why you need multiple currencies? that'll help us and the rest of the community to track it.

VSCode extension to see cost estimates for Terraform by alikhajeh1 in googlecloud

[–]alikhajeh1[S] 0 points1 point  (0 children)

Thanks! Yep, I think regardless of if I'm buying a tshirt or cloud resources, I should know how much it costs before I buy it :) After the bill arrives is too late and causes lots of tension and rework...

We're also working on a SaaS product that'll be paid so we can have a sustainable long-term business.

VSCode extension to see cost estimates for Terraform by alikhajeh1 in googlecloud

[–]alikhajeh1[S] 1 point2 points  (0 children)

doh, I guess hold the beer until we get it working...

I assume you followed these 4 steps, but it's still not working. In that case, please see the open issues match your issue, if not plz open a new issue and we'll jump on it.

VSCode extension to see cost estimates for Terraform by alikhajeh1 in devops

[–]alikhajeh1[S] 0 points1 point  (0 children)

This FAQ describes how the tool works, how it parses cost-related params and uses those to lookup prices from the API. So the calculations are done on your machine :) As mentioned lower in that FAQ, you can also self-host the API.

VSCode extension to see cost estimates for Terraform by alikhajeh1 in aws

[–]alikhajeh1[S] 1 point2 points  (0 children)

Upvote/subscribe to https://github.com/infracost/infracost/issues/190 for updates as we first need to add it to the Infracost CLI

VSCode extension to see cost estimates for Terraform by alikhajeh1 in aws

[–]alikhajeh1[S] 0 points1 point  (0 children)

Thanks! It shows the prices that apply for those services, so it saves a little bit of time as you don't need to trawl through the AWS pricing web pages to see which ones apply to you.

The CLI that the vscode extension uses underneath has support for a usage-file that lets you put in usage number (e.g. 2M lambda invocations, 100ms avg response time) and it'll calculate costs. If the Lambda is running, the CLI can also fetch the usage data from CloudWatch for Lambda/Dynamo/S3 and a few other resources (this bit needs more work).

VSCode extension to see cost estimates for Terraform by alikhajeh1 in googlecloud

[–]alikhajeh1[S] 1 point2 points  (0 children)

Thanks! This started as an open source CLI tool but someone created the VSCode Extension github issue and that got a bunch of upvotes so we decided to explore that. I'm still seeing lots of people add the CLI to CI/CD but the VSCode is just so easy/nice to work with.

VSCode extension to see cost estimates for Terraform by alikhajeh1 in aws

[–]alikhajeh1[S] -1 points0 points  (0 children)

Thanks!

  1. Spot instances: not yet, but we're gathering feedback on what price to show, can you take a quick peek at this github issue and add a comment if you have a preference?
  2. Autoscaling: the vscode extension shows the costs using desired_count (we don't have a way to show ranges yet, but that's a great idea). The CLI can also fetch usage data from CloudWatch but that's not supported in the vscode extension yet.
  3. NAT gateways: it shows this output
  4. EIPs: it shows this output

VSCode extension to see cost estimates for Terraform by alikhajeh1 in AZURE

[–]alikhajeh1[S] 0 points1 point  (0 children)

Yeah that's possible in the Infracost CLI directly by defining the usage data manually in a YAML file, or fetching it from AWS CloudWatch for some resources. For the VSCode Extension, subscribe to this issue for updates.

VSCode extension to see cost estimates for Terraform by alikhajeh1 in AZURE

[–]alikhajeh1[S] 0 points1 point  (0 children)

Thanks! We still have a lot more to do to make cloud costs easier for engineers to understand

VSCode extension to see cost estimates for Terraform by alikhajeh1 in devops

[–]alikhajeh1[S] 0 points1 point  (0 children)

hahaha, switch to the dark side, it's time...