Title
#general
Marc Richard

Marc Richard

04/29/2022, 9:50 AM
Hi, I wonder if it would not be possible to have a detailed report on the HTML output part (as well). Indeed I have the total simulation price (for example) of all my lambdas, however I have lost the finesse I may have had before (when I was reporting on github comments). Thank you very much for this really great product!
Ali (Infracost)

Ali (Infracost)

04/29/2022, 9:57 AM
Hi Marc, do you mean a HTML page that shows a cost estimate breakdown and a diff? Have you tried the share-link feature?
Marc Richard

Marc Richard

04/29/2022, 11:54 AM
thank you for your reply, actually (and yes I have to create a medium post about it πŸ˜„ ) We re using several products for each squads, we're using ttps://backstage.io/ to provide a complete developer portal. On this portal we provide bunch of complete view of each feature, newrelic, sentry view, terraform visualization, documentation, finops (thanks to you), and security (dependency check and so on) The whole missing things, is the HTML report contains Project total for each of our infrastructure stack (ECS, lambda, SQS, Dynamo, ...) But for lambdas, we only have an overal cost, that we could improve with cost per lambdas... WDYTAT ?
Ali (Infracost)

Ali (Infracost)

04/29/2022, 12:49 PM
If I understand it right, we currently show the prices for lambda, but that’s kinda useless as you see the same price repeated. Instead, you want to see the cost per lampda function. Have you tried this feature to fetch the lambda costs from CloudWatch?
5:04 PM
You can also run that in CI/CD by using a dummy file, e.g.:
infracost breakdown --usage-file /tmp/ignore.yml --sync-usage-file --path ...
Marc Richard

Marc Richard

05/10/2022, 10:20 AM
okkkk I see: I understand why I have an issue on this part: I have a panic on the sync-usage part:
time="2022-05-10T10:02:13Z" level=info msg="Detected Terraform plan JSON file at tfplan.json"
4609
time="2022-05-10T10:02:13Z" level=info msg="Starting: Extracting only cost-related params from terraform"
4610
time="2022-05-10T10:02:15Z" level=info msg="Starting: Syncing usage data from cloud"
4611
panic: interface conversion: interface {} is []*schema.UsageItem, not *usage.ResourceUsage
4612

4613
goroutine 71 [running]:
4614
<http://github.com/infracost/infracost/internal/usage.replaceResourceUsages(0xc000f1bd70|github.com/infracost/infracost/internal/usage.replaceResourceUsages(0xc000f1bd70>, 0xc000bf7f18, {0x53?})
4615
	/home/runner/work/infracost/infracost/internal/usage/sync.go:256 +0x5c9
4616
<http://github.com/infracost/infracost/internal/usage.syncResource(0xc000120200|github.com/infracost/infracost/internal/usage.syncResource(0xc000120200>, 0xc000d9d970, 0x7069726373656422?, 0x4b223a226e6f6974?)
4617
	/home/runner/work/infracost/infracost/internal/usage/sync.go:196 +0x15d
4618
<http://github.com/infracost/infracost/internal/usage.syncResourceUsages.func1(0x223a226c65646f6d|github.com/infracost/infracost/internal/usage.syncResourceUsages.func1(0x223a226c65646f6d>?, 0x746e617267222c22?)
4619
	/home/runner/work/infracost/infracost/internal/usage/sync.go:116 +0x6a
4620
created by <http://github.com/infracost/infracost/internal/usage.syncResourceUsages|github.com/infracost/infracost/internal/usage.syncResourceUsages>
4621
	/home/runner/work/infracost/infracost/internal/usage/sync.go:114 +0x4a5
4622
time="2022-05-10T10:02:17Z" level=info msg="Detected Terraform plan JSON file at tfplan.json"
4623
time="2022-05-10T10:02:17Z" level=info msg="Starting: Extracting only cost-related params from terraform"
4624
time="2022-05-10T10:02:19Z" level=info msg="Starting: Retrieving cloud prices to calculate costs"
4625
time="2022-05-10T10:02:19Z" level=warning msg="No products found for aws_launch_configuration Instance usage (Linux/UNIX, on-demand, t2.medium), using 0.00"
4626
time="2022-05-10T10:02:20Z" level=warning msg="No products found for aws_launch_configuration Instance usage (Linux/UNIX, on-demand, t2.medium), using 0.00"
I didn't notice it befoire
Ali (Infracost)

Ali (Infracost)

05/10/2022, 1:43 PM
ah interesting, can you please create an issue with that output? Please include the
--infracost version
you’re using and
--log-level debug
if it doesn’t have anything sensitive so we can take a look.
Marc Richard

Marc Richard

05/20/2022, 10:11 AM
7:24 AM
hi @Vadim (Infracost) I'm wondering if I can send to you directly the module I use, and the complete integration. Could be a lill' difficult to sent to you using github issue πŸ™‚
Vadim (Infracost)

Vadim (Infracost)

05/24/2022, 1:30 PM
@Marc Richard Hey! Sorry for a late reply. Sure thing, this will be a huge help, thank you! Could you please double check that any secrets are removed? This only will be privately used to reproduce the problem, but better to be safe πŸ™‚
Marc Richard

Marc Richard

05/24/2022, 4:30 PM
sure I will πŸ™‚
5:21 PM
sent on PM (sorry for this, i'm not a big PM fan, but in case of mistake πŸ˜› )
8:01 AM
on the same time, I will try with the parse HCL new feature πŸ™‚