https://infracost.io logo
Title
k

kind-angle-62935

02/08/2023, 3:35 PM
Is
exclude_paths
relative to the path of the project or the root of where it's being told to run?
l

little-author-61621

02/08/2023, 3:38 PM
path of project
k

kind-angle-62935

02/08/2023, 3:39 PM
And there is currently still no way to tell infracost to not recursively try to detect things to run on? "run on this dir and that's it"?
w

white-airport-8778

02/08/2023, 3:41 PM
@kind-angle-62935 I added an include/exclude path example in case that’s helps
include_all_paths: true
k

kind-angle-62935

02/08/2023, 3:43 PM
Yeah, I guess I'm not really groking what
include_all_paths
does. By default it's
false
? But if it's
false
by default, infracost still recursively runs?
w

white-airport-8778

02/08/2023, 3:49 PM
An example might help (I’ll keep tweaking the docs). Given the following config-file, the CLI goes down to 10 levels deep in the
dev
dir to find terraform files:
version: 0.1
projects:
  - path: dev
    include_all_paths: true
Without
include_all_paths: true
, only the
dev
directory is checked for terraform files.
k

kind-angle-62935

02/08/2023, 3:51 PM
Is
include_all_paths
true
by default?
What would you expect to happen with the following?
version: 0.1
projects:
  - path: dev
    include_all_paths: false
  - path: dev/bar
    include_all_paths: false
w

white-airport-8778

02/08/2023, 4:20 PM
Sorry I forgot about the root vs non-root modules, ignore my previous answer.
include_all_paths: true
tells the CLI path autodetect function to use all directories (i.e. root and non-root modules) with valid project files, down to a max depth of 10 directories. By default Infracost will try to autodetect only root Terraform modules. Setting this to true includes subdirectories that we detect as modules instead of only root modules. (I’ll keep iterating on the docs…)