$ infracost --tfplan /tmp/plan.save --tfdir .
INFO Running command: /Users/hamidreza.josheghani.nl/bin/terragrunt show -json /tmp/plan.save
ERROR [terragrunt] 2020/07/27 18:20:09 Reading Terragrunt config file at /Users/hamidreza.josheghani.nl/.terragrunt-cache/JUfGA5wi4WTKJQMziGewY--KhGo/s2C_bji1SyqpvI6oza4fKa5ohpw/mgmt/jenkins/terragrunt.hcl
ERROR [terragrunt] 2020/07/27 18:20:09 /Users/hamidreza.josheghani.nl/.terragrunt-cache/JUfGA5wi4WTKJQMziGewY--KhGo/s2C_bji1SyqpvI6oza4fKa5ohpw/mgmt/jenkins/terragrunt.hcl:24,10-33: Error in function call; Call to function "find_in_parent_folders" failed: ParentFileNotFound: Could not find a terragrunt.hcl in any of the parent folders of /Users/hamidreza.josheghani.nl/.terragrunt-cache/JUfGA5wi4WTKJQMziGewY--KhGo/s2C_bji1SyqpvI6oza4fKa5ohpw/mgmt/jenkins/terragrunt.hcl. Cause: Traversed all the way to the root.., and 1 other diagnostic(s)
ERROR [terragrunt] 2020/07/27 18:20:09 Unable to determine underlying exit code, so Terragrunt will exit with error code 1
exit status 1
➜ jenkins git:(65d6dba) ✗ cd ~/Documents/DevOps/bits/in/infrastructure-live/shared-services/us-west-2/mgmt/jenkins
➜ jenkins git:(master) avshrd infracost --tfplan /tmp/plan.save --tfdir .
INFO Running command: /Users/hamidreza.josheghani.nl/bin/terragrunt show -json /tmp/plan.save
ERROR [terragrunt] 2020/07/27 18:20:18 Reading Terragrunt config file at /Users/hamidreza.josheghani.nl/Documents/DevOps/bits/in/infrastructure-live/shared-services/us-west-2/mgmt/jenkins/terragrunt.hcl
ERROR [terragrunt] [/Users/hamidreza.josheghani.nl/Documents/DevOps/bits/in/infrastructure-live/shared-services/us-west-2/mgmt/jenkins] 2020/07/27 18:20:18 Running command: terraform --version
ERROR [terragrunt] 2020/07/27 18:20:18 Terraform files in /Users/hamidreza.josheghani.nl/.terragrunt-cache/JUfGA5wi4WTKJQMziGewY--KhGo/s2C_bji1SyqpvI6oza4fKa5ohpw/mgmt/jenkins are up to date. Will not download again.
ERROR [terragrunt] 2020/07/27 18:20:18 Copying files from /Users/hamidreza.josheghani.nl/Documents/DevOps/bits/in/infrastructure-live/shared-services/us-west-2/mgmt/jenkins into /Users/hamidreza.josheghani.nl/.terragrunt-cache/JUfGA5wi4WTKJQMziGewY--KhGo/s2C_bji1SyqpvI6oza4fKa5ohpw/mgmt/jenkins
ERROR [terragrunt] 2020/07/27 18:20:18 Setting working directory to /Users/hamidreza.josheghani.nl/.terragrunt-cache/JUfGA5wi4WTKJQMziGewY--KhGo/s2C_bji1SyqpvI6oza4fKa5ohpw/mgmt/jenkins
ERROR [terragrunt] 2020/07/27 18:20:20 Running command: terraform show -json /tmp/plan.save
panic: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 1 [running]:
infracost/pkg/parsers/terraform.parseModule(0x5, 0xc0003e0000, 0x64593, 0x0, 0x0, 0x0, 0x0, 0x5, 0xc00041e5d2, 0xab, ...)
/Users/ali/code/infracost/pkg/parsers/terraform/terraform.go:156 +0x10af
infracost/pkg/parsers/terraform.parseModule(0x5, 0xc0003e0000, 0x64593, 0x0, 0x0, 0x0, 0x0, 0x5, 0xc00041e5d2, 0xab, ...)
/Users/ali/code/infracost/pkg/parsers/terraform/terraform.go:176 +0xd01
infracost/pkg/parsers/terraform.parseModule(0x5, 0xc0003e0000, 0x64593, 0x0, 0x0, 0x0, 0x0, 0x5, 0xc00041e5d2, 0xab, ...)
/Users/ali/code/infracost/pkg/parsers/terraform/terraform.go:176 +0xd01
infracost/pkg/parsers/terraform.ParsePlanJSON(0xc000360000, 0x64593, 0x7fe00, 0xe, 0xc000360000, 0x64593, 0x7fe00, 0x0)
/Users/ali/code/infracost/pkg/parsers/terraform/terraform.go:145 +0x382
main.main.func2(0xc000154a80, 0xc000128e00, 0xe)
/Users/ali/code/infracost/cmd/infracost/main.go:123 +0x256
github.com/urfave/cli/v2.(*App).RunContext(0xc000132180, 0x151d4e0, 0xc000134008, 0xc000138000, 0x5, 0x5, 0x0, 0x0)
/Users/ali/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:315 +0x70b
github.com/urfave/cli/v2.(*App).Run(...)
/Users/ali/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:215
main.main()
/Users/ali/code/infracost/cmd/infracost/main.go:153 +0x4fb
Due to the terragrunt being a wrapper around terraform, I expected the same result running infracost with terragrunt binary. I maybe have a wrong assumption, but wanted to ask you about this.