414 karma · joined March 1, 2012
Then agent traffic started showing up, and it became clear the 1.0 scope was the right idea aimed at the wrong caller. A human reviewer reads a PR comment; an agent runs `infracost inspect --filter` ... and gets the same insight as a tabular row it can pipe into the next step. So we decided to skip our planned 1.0 release and go for 2.0, where we treated agents as a first-class citizen user of the CLI.
Along the way we picked up some interesting lessons on optimizing user token usage when designing a CLI, and we want to share them with the HN community since other CLI builders might benefit.
I think the easier we make it for engineers to fix tagging issues, the more likely it'll be for engineers to take action. Send me an email asking me to read the company's wiki page on tagging policy and I'll delete the email; tell me I have a typo on line 8 as soon as I open my pull request, I'll fix it and move on.
The testing analogy is a good one as this feature also shows the engineers the current "failing policies" on the main branch too, so whilst they could merge the pull request without fixing the tagging issue, it'll just get added to the list. And maybe like tests, they group them into one task and go through to fix them all every so often to get the main branch back to green!
But you're right that it needs usage data, or models of usage data... For now, the CLI can fetch usage data from the cloud APIs for S3/Lambda/Dynamo and show engineers that functionX was invoked 2M times in the last 30 days: https://www.infracost.io/docs/features/usage_based_resources...
The other data source we can tap into is the actual billing data, e.g. AWS Cloud and Usage Reports - if you have any thoughts/preferences, checkout https://github.com/infracost/infracost/discussions/985#discu...
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
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.
My previous iterations were in 2010 (scrapers to fetch cloud prices as vendors didn't offer APIs then - there were over 10,000 prices back then) and in 2015 (a RESTful API - there were over 100,000 prices then).
Whilst this latest Cloud Pricing API was built with the open source Infracost CLI in mind, I'm curious if people find it useful as a standalone thing? I'm happy to help people who want to build stuff on top of it.