Is someone able to explain to my why, when I run `...
# help
b
Is someone able to explain to my why, when I run
infracost scan .
at my repo root, I get an output like:
Copy code
│   Project                                Resources  Monthly Cost  FinOps     Tagging                │
│   amazonaws.com                                 19        $5,384  4 (⚠️ x3)  1 (⚠️ x1)
But when I run `infracost scan project_path, I get:
Copy code
│   Project                  Resources  Monthly Cost  FinOps     Tagging                              │
│   main                            19            $0  4 (⚠️ x3)  1 (⚠️ x1)
I did just come back to infracost after a few years (had to upgrade my client from v0.10.0), but I'm finding that the user experience has become very unintuitive and, while I realize monetization is a priority, the move to deprecate
infracost breakdown
in favor of
infracost scan
is a bad one.
I also seem to be running into a transient error (looks to be tied to
~/.cache/infracost/
) in which a Terraform module in the same git repository is not discovered by infracost, despite being hard-coded into
infracost.yml::projects[].dependency_paths
(
infracost.yml
sits at the repo root, all paths in the config file are relative to the root dir).
e
Hey Casey, thanks for the message - just jumping in here quick, I'll have the team look and respond soon 🙂 Everyone is currently travelling for our company offsite, but will be back on soon ❤️
b
Hey Casey 👋 Sorry you're problems with the new interface. I can assure you the change isn't one driven by monetization, it's largely been about breaking out the interface to have more flexible primitives given the multitude of different workflows get built around the CLI these days. We know it was a big enough change in UI that we jumped from 0.x.x versions straight to 2.x.x, and probably feels especially foreign if you've also been away for a few years.
A couple of incremental steps to help us work out what's going on here though. Once you've run
infracost scan
the command will output various
infracost inspect
commands to help you output the (now cached) results in different formats.
If you do an
inspect
by resource you'll probably see why the cost amounts are different. My guess is there's an
infracost.yml
file in the repo root which defines the
<http://amazonaws.com|amazonaws.com>
project, and maybe includes some usage based values? When you specify the project path it's not walking up to the parent directory/repo root to find the yaml config. I'm kinda guessing based on the results.
If you're up for having a quick call drop me a DM. Happy to walk through this with you and unblock you, and would just generally appreciate to get more feedback.