Hello, I'm running into the following error just o...
# help
k
Hello, I'm running into the following error just on the Terragrunt demo checkout:
Copy code
~/terragrunt-infrastructure-live-example$ infracost breakdown --path=/home/josh/terragrunt-infrastructure-live-example/
Detected Terragrunt directory at /home/josh/terragrunt-infrastructure-live-example/

Error: Error processing module at '/home/josh/terragrunt-infrastructure-live-example/terragrunt.hcl'. How this module was found: Terragrunt config file found in a subdirectory of /home/josh/terragrunt-infrastructure-live-example/. Underlying error: /home/josh/terragrunt-infrastructure-live-example/terragrunt.hcl:9,41-64: Error in function call; Call to function "find_in_parent_folders" failed: ParentFileNotFound: Could not find a account.hcl in any of the parent folders of /home/josh/terragrunt-infrastructure-live-example/terragrunt.hcl. Cause: Traversed all the way to the root..
~/terragrunt-infrastructure-live-example$ infracost --version
Infracost v0.10.17
l
k
Yes
l
Hmm… this seems odd (https://github.com/gruntwork-io/terragrunt-infrastructure-live-example/blob/master/terragrunt.hcl#L9). Since there’s a terragrunt.hcl file in the top-level directory, we are treating that as a Terragrunt project, and it doesn’t have any parent folders
So we’re showing the same error that terragrunt itself shows if you run
terragrunt run-all plan
on that directory
Does pointing to one of the subdirectories work, i.e.
infracost breakdown --path=/home/josh/terragrunt-infrastructure-live-example/prod
k
Checking...
@little-author-61621 That does work!
Interesting, thank you
l
Something like this might also work, so that infracost doesn’t think the top level directory is a Terragrunt project:
Copy code
infracost breakdown --path=/home/josh/terragrunt-infrastructure-live-example --exclude-path=terragrunt.hcl
k
Yes, that does work as well. Thank you for help even though the issue is in this terragrunt repo
488 Views