infracost: Infracost Appears Broken with terragrunt v0.37.1 + Terraform v1.2.1

System Info:

Infracost v0.10.0
Terraform v1.2.1
terragrunt version v0.37.1

I have been happily using infracost for a few weeks. I recently updated to the latest version of Terraform + Terragrunt, and when I attempt to run Infracost, I now get the following panic/exit:

❯ infracost breakdown --path .
Detected Terragrunt directory at .
panic: must not call MapVal with empty map

goroutine 82 [running]:
github.com/zclconf/go-cty/cty.MapVal(0x140001ee770?)
	github.com/zclconf/go-cty@v1.10.0/cty/value_init.go:212 +0x4ac
github.com/infracost/infracost/internal/providers/terraform.(*TerragruntHCLProvider).fetchDependencyOutputs(0x1400078e210, 0x140001b8900)
	github.com/infracost/infracost/internal/providers/terraform/terragrunt_hcl_provider.go:316 +0x4d0
github.com/infracost/infracost/internal/providers/terraform.(*TerragruntHCLProvider).runTerragrunt(0x1400078e210, 0x140001b8900)
	github.com/infracost/infracost/internal/providers/terraform/terragrunt_hcl_provider.go:183 +0x48
github.com/infracost/infracost/internal/providers/terraform.(*TerragruntHCLProvider).prepWorkingDirs.func1(0x140004c0930?)
	github.com/infracost/infracost/internal/providers/terraform/terragrunt_hcl_provider.go:141 +0x34
github.com/gruntwork-io/terragrunt/configstack.(*runningModule).runNow(0x14000063540)
	github.com/gruntwork-io/terragrunt@v0.36.9/configstack/running_module.go:239 +0x10c
github.com/gruntwork-io/terragrunt/configstack.(*runningModule).runModuleWhenReady(0x0?, 0x1400018e420)
	github.com/gruntwork-io/terragrunt@v0.36.9/configstack/running_module.go:202 +0x84
github.com/gruntwork-io/terragrunt/configstack.runModules.func1(0x1400056e9c0?)
	github.com/gruntwork-io/terragrunt@v0.36.9/configstack/running_module.go:172 +0x54
created by github.com/gruntwork-io/terragrunt/configstack.runModules
	github.com/gruntwork-io/terragrunt@v0.36.9/configstack/running_module.go:170 +0x78

Please advise. Thank you!

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

@hugorut & @alikhajeh1 - We’d gladly beta test stuff for you guys as customers, if you’re interested. We’re called 5thKind, and our customers are some of the biggest names in Film/TV/Media. 😃

Feel free to reach out to me - armen.rostamian@5thkind.com

https://www.linkedin.com/in/armenr/

nice to hear @armenr, I hope you have a play around with Infracost Cloud and give us your feedback. I know @alikhajeh1 would be thrilled to hear any suggestions or gripes you have with it!

Thanks @armenr, glad it’s working for you now 🚀