Hi, I wonder if it would not be possible to have a...
# general
b
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!
πŸ‘‹ 1
w
Hi Marc, do you mean a HTML page that shows a cost estimate breakdown and a diff? Have you tried the share-link feature?
b
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 ?
w
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?
πŸ™Œ 1
You can also run that in CI/CD by using a dummy file, e.g.:
Copy code
infracost breakdown --usage-file /tmp/ignore.yml --sync-usage-file --path ...
πŸ™Œ 1
b
okkkk I see: I understand why I have an issue on this part: I have a panic on the sync-usage part:
Copy code
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
w
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.
βœ… 1
b
done, https://github.com/infracost/infracost/issues/1675 ty so much for your support
πŸ™Œ 1
hi @busy-agent-35515 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 πŸ™‚
b
@brave-secretary-81644 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 πŸ™‚
πŸ™Œ 1
b
sure I will πŸ™‚
πŸ‘ 1
πŸ˜„ 1
sent on PM (sorry for this, i'm not a big PM fan, but in case of mistake πŸ˜› )
πŸ‘ 1
on the same time, I will try with the parse HCL new feature πŸ™‚
πŸš€ 1
πŸ™Œ 1