gruntwork-io / terragrunt

Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale.
https://terragrunt.gruntwork.io/
MIT License
8.09k stars 981 forks source link

read_terragrunt_config function to read inputs from different child module #1066

Open chandrakanthkannam opened 4 years ago

chandrakanthkannam commented 4 years ago

Hi,

I was trying to use the new function read_terragrunt_config to read inputs from a different child module instead of the config file in parent location and present .hcl file looked like this Test 1:

locals {
  db_vars = read_terragrunt_config("${get_terragrunt_dir()}/../database/terragrunt.hcl")
}

inputs = merge(
  local.db_vars.inputs,
{
<additional inputs>
}
)

Note: I tried this syntax in locals block db_vars = read_terragrunt_config("../database/terragrunt.hcl") and its throwing the same results as mentioned in Results Got

Expected Result: It to import the inputs from ../database/terragrunt.hcl to the present child module

Results Got: While doing a terragrunt plan-all the process clocking high memory usage on my machine and throwing this result after few minutes of blank screen:

runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow

runtime stack:
runtime.throw(0x1c5525c, 0xe)
        /usr/local/Cellar/go/1.13.8/libexec/src/runtime/panic.go:774 +0x72
runtime.newstack()
        /usr/local/Cellar/go/1.13.8/libexec/src/runtime/stack.go:1046 +0x6e9
runtime.morestack()
        /usr/local/Cellar/go/1.13.8/libexec/src/runtime/asm_amd64.s:449 +0x8f

goroutine 1 [running]:
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseExpressionTraversals(0xc151a2e5e8, 0x1eebfa0, 0xc256889ce0, 0x0, 0x0, 0x0, 0x0, 0xc273cb8d90)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:590 +0x4f82 fp=0xc151a17bd8 sp=0xc151a17bd0 pc=0x1241af2
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseExpressionWithTraversals(0xc151a2e5e8, 0x0, 0x0, 0x0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:585 +0x72 fp=0xc151a17c78 sp=0xc151a17bd8 pc=0x123c9f2
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:514 +0xd92 fp=0xc151a18148 sp=0xc151a17c78 pc=0x123c912
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca8, 0x1, 0x1, 0x0, 0x1ecdde0, 0x0, 0x0, 0xc0000bc030)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a18618 sp=0xc151a18148 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca0, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0xc0000ca198)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a18ae8 sp=0xc151a18618 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c98, 0x3, 0x3, 0xc255dcbb0e, 0x1, 0xf2, 0xc273cb8d90, 0x64)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a18fb8 sp=0xc151a18ae8 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c90, 0x4, 0x4, 0x0, 0x29, 0xc255dcbb20, 0x1, 0xe0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a19488 sp=0xc151a18fb8 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c88, 0x5, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a19958 sp=0xc151a19488 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c80, 0x6, 0x6, 0x2a8, 0xc273f0c8c0, 0x64, 0xf, 0x54)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a19e28 sp=0xc151a19958 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseTernaryConditional(0xc151a2e5e8, 0x1b50800, 0xc000566000, 0x29a91f0, 0x20, 0x58)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:460 +0xff fp=0xc151a1a530 sp=0xc151a19e28 pc=0x123abef
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).ParseExpression(0xc151a2e5e8, 0x49, 0xc25686c158, 0xa, 0x2a8, 0xc273f0c8c0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:444 +0x2b fp=0xc151a1a570 sp=0xc151a1a530 pc=0x123aaab
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).finishParsingFunctionCall(0xc151a2e5e8, 0x49, 0xc25686c150, 0x7, 0x2b0, 0xc273f0c8c0, 0x64, 0xf, 0x4c, 0x150, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:1108 +0x1cc fp=0xc151a1ae80 sp=0xc151a1a570 pc=0x1244d8c
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseExpressionTerm(0xc151a2e5e8, 0xf0, 0xf0, 0x1bd3ce0, 0xc1fb6788a0, 0x10000000000005a)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:948 +0x24d6 fp=0xc151a1bde0 sp=0xc151a1ae80 pc=0x1244786
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseExpressionWithTraversals(0xc151a2e5e8, 0xc256653cc1, 0x19, 0xc255fb5900, 0xc151a1c7b0, 0x1245188)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:584 +0x40 fp=0xc151a1be80 sp=0xc151a1bde0 pc=0x123c9c0
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca8, 0x0, 0x0, 0xc255dcb320, 0xc25681aea0, 0xe0, 0xc1fb6788a0, 0x29)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:514 +0xd92 fp=0xc151a1c350 sp=0xc151a1be80 pc=0x123c912
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca8, 0x1, 0x1, 0x0, 0x0, 0x203095, 0xc29d03bfe0, 0xc151a1c8d0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a1c820 sp=0xc151a1c350 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca0, 0x2, 0x2, 0x400, 0x2f, 0x33, 0x1, 0x1)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a1ccf0 sp=0xc151a1c820 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c98, 0x3, 0x3, 0xc29d1c0fa4, 0xc29d1c0fa0, 0x4, 0xc29d1c0fa4, 0xc151a1d3c0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a1d1c0 sp=0xc151a1ccf0 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c90, 0x4, 0x4, 0x2a, 0x40, 0x55b, 0x2a, 0x41)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a1d690 sp=0xc151a1d1c0 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c88, 0x5, 0x5, 0x17, 0x32, 0x291, 0x17, 0xc151a1dc80)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a1db60 sp=0xc151a1d690 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c80, 0x6, 0x6, 0x2b0, 0xc273f0c8c0, 0x64, 0xf, 0x4c)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a1e030 sp=0xc151a1db60 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseTernaryConditional(0xc151a2e5e8, 0x100e738, 0x60, 0x1b79ea0, 0xc256653a01, 0xc256889bc0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:460 +0xff fp=0xc151a1e738 sp=0xc151a1e030 pc=0x123abef
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).ParseExpression(0xc151a2e5e8, 0x2200, 0xc25686c14e, 0x2, 0x2b2, 0xc273f0c8c0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:444 +0x2b fp=0xc151a1e778 sp=0xc151a1e738 pc=0x123aaab
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseTemplateParts(0xc151a2e5e8, 0xbb, 0x1, 0x0, 0xc151a20de8, 0x125fe99)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser_template.go:411 +0x4a19 fp=0xc151a20ce8 sp=0xc151a1e778 pc=0x125aff9
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseTemplateInner(0xc151a2e5e8, 0xbb, 0xc25686c14d, 0x1, 0x2b3, 0xc273f0c8c0, 0x0, 0x0, 0x0, 0x0, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser_template.go:37 +0x71 fp=0xc151a20df8 sp=0xc151a20ce8 pc=0x12522c1
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseExpressionTerm(0xc151a2e5e8, 0x36b, 0x1f, 0x45, 0x36c, 0x49)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:983 +0xfe6 fp=0xc151a21d58 sp=0xc151a20df8 pc=0x1243296
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseExpressionWithTraversals(0xc151a2e5e8, 0xc273f0c8c0, 0x64, 0xf, 0x19, 0x11d)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:584 +0x40 fp=0xc151a21df8 sp=0xc151a21d58 pc=0x123c9c0
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca8, 0x0, 0x0, 0x64, 0xf, 0x19, 0x11d, 0xf)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:514 +0xd92 fp=0xc151a222c8 sp=0xc151a21df8 pc=0x123c912
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca8, 0x1, 0x1, 0x26af2a0, 0x100, 0xc1fb6788a0, 0x5a, 0x3b)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a22798 sp=0xc151a222c8 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca0, 0x2, 0x2, 0x26af2a0, 0x100, 0xc1fb6788a0, 0x5a, 0x3b)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a22c68 sp=0xc151a22798 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c98, 0x3, 0x3, 0x26af2a0, 0x100, 0xc1fb6788a0, 0x5a, 0x3b)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a23138 sp=0xc151a22c68 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c90, 0x4, 0x4, 0x26af2a0, 0x100, 0xc1fb6788a0, 0x5a, 0x3b)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a23608 sp=0xc151a23138 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c88, 0x5, 0x5, 0x8, 0x100, 0xc1fb6788a0, 0x20308d, 0x3b)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a23ad8 sp=0xc151a23608 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c80, 0x6, 0x6, 0x2b3, 0xc273f0c8c0, 0x64, 0xf, 0x49)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a23fa8 sp=0xc151a23ad8 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseTernaryConditional(0xc151a2e5e8, 0x100e738, 0x60, 0x1b79ea0, 0xc256653b01, 0xc256889b00)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:460 +0xff fp=0xc151a246b0 sp=0xc151a23fa8 pc=0x123abef
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).ParseExpression(0xc151a2e5e8, 0xab, 0xc25686c14d, 0x1, 0x2b3, 0xc273f0c8c0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:444 +0x2b fp=0xc151a246f0 sp=0xc151a246b0 pc=0x123aaab
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseTupleCons(0xc151a2e5e8, 0x0, 0x0, 0x0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:1205 +0x380 fp=0xc151a24f50 sp=0xc151a246f0 pc=0x1246420
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseExpressionTerm(0xc151a2e5e8, 0xf, 0x113, 0x28, 0xc25686c11c, 0x1)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:1034 +0x25bb fp=0xc151a25eb0 sp=0xc151a24f50 pc=0x124486b
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseExpressionWithTraversals(0xc151a2e5e8, 0x1, 0xc256888480, 0xc1fb6788a0, 0x5a, 0x3b)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:584 +0x40 fp=0xc151a25f50 sp=0xc151a25eb0 pc=0x123c9c0
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:514 +0xd92 fp=0xc151a26420 sp=0xc151a25f50 pc=0x123c912
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca8, 0x1, 0x1, 0x39, 0x65a, 0x3c, 0x1, 0x65b)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a268f0 sp=0xc151a26420 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca0, 0x2, 0x2, 0x1, 0x335, 0xc273f0c8c0, 0x64, 0xa)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a26dc0 sp=0xc151a268f0 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c98, 0x3, 0x3, 0x39, 0x65a, 0x3c, 0x1, 0x65b)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a27290 sp=0xc151a26dc0 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c90, 0x4, 0x4, 0x39, 0x65a, 0x3c, 0x1, 0x65b)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a27760 sp=0xc151a27290 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c88, 0x5, 0x5, 0x39, 0x65a, 0x3c, 0x1, 0x65b)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a27c30 sp=0xc151a27760 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c80, 0x6, 0x6, 0x2b4, 0xc273f0c8c0, 0x64, 0xf, 0x48)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a28100 sp=0xc151a27c30 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseTernaryConditional(0xc151a2e5e8, 0x46, 0x14a, 0xf, 0x47, 0x14b)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:460 +0xff fp=0xc151a28808 sp=0xc151a28100 pc=0x123abef
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).ParseExpression(0xc151a2e5e8, 0x3f, 0xc25686c14a, 0x1, 0x2b6, 0xc273f0c8c0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:444 +0x2b fp=0xc151a28848 sp=0xc151a28808 pc=0x123aaab
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseTernaryConditional(0xc151a2e5e8, 0x100e738, 0x10, 0x1b2d160, 0x1, 0xc256775ff0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:473 +0x263 fp=0xc151a28f50 sp=0xc151a28848 pc=0x123ad53
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).ParseExpression(0xc151a2e5e8, 0x3d, 0xc25686c114, 0x1, 0x2ec, 0xc273f0c8c0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:444 +0x2b fp=0xc151a28f90 sp=0xc151a28f50 pc=0x123aaab
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseObjectCons(0xc151a2e5e8, 0x0, 0x0, 0x0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:1348 +0x5a7 fp=0xc151a29d90 sp=0xc151a28f90 pc=0x1247807
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseExpressionTerm(0xc151a2e5e8, 0x0, 0x0, 0xc256889080, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:1037 +0x2559 fp=0xc151a2acf0 sp=0xc151a29d90 pc=0x1244809
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseExpressionWithTraversals(0xc151a2e5e8, 0x3, 0x501, 0x31, 0x4, 0x502)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:584 +0x40 fp=0xc151a2ad90 sp=0xc151a2acf0 pc=0x123c9c0
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca8, 0x0, 0x0, 0x0, 0xc273f0c230, 0x65, 0x13, 0x2)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:514 +0xd92 fp=0xc151a2b260 sp=0xc151a2ad90 pc=0x123c912
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca8, 0x1, 0x1, 0x1ae0980, 0xc273f0c8c0, 0x64, 0xa, 0x13)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a2b730 sp=0xc151a2b260 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1ca0, 0x2, 0x2, 0xe0, 0xe0, 0x1bc2780, 0xc273f0c8c0, 0x100000000000064)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a2bc00 sp=0xc151a2b730 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c98, 0x3, 0x3, 0x1b, 0xcb, 0xb, 0x1, 0xcc)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a2c0d0 sp=0xc151a2bc00 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c90, 0x4, 0x4, 0x1eda6a0, 0x0, 0x2, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a2c5a0 sp=0xc151a2c0d0 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c88, 0x5, 0x5, 0xc151a2cb30, 0x100dec6, 0xc256821560, 0x120, 0x108)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a2ca70 sp=0xc151a2c5a0 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseBinaryOps(0xc151a2e5e8, 0xc0000c1c80, 0x6, 0x6, 0x328, 0xc273f0c8c0, 0x64, 0xd, 0xa)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:528 +0xad fp=0xc151a2cf40 sp=0xc151a2ca70 pc=0x123bc2d
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).parseTernaryConditional(0xc151a2e5e8, 0x350, 0xc273f0c8c0, 0x64, 0x9, 0x13)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:460 +0xff fp=0xc151a2d648 sp=0xc151a2cf40 pc=0x123abef
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).ParseExpression(0xc151a2e5e8, 0x3d, 0xc25686c0d6, 0x1, 0x32a, 0xc273f0c8c0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:444 +0x2b fp=0xc151a2d688 sp=0xc151a2d648 pc=0x123aaab
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).finishParsingBodyAttribute(0xc151a2e5e8, 0x49, 0xc25686c0cf, 0x6, 0x331, 0xc273f0c8c0, 0x64, 0xd, 0x1, 0xcf, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:225 +0xe4 fp=0xc151a2dbe8 sp=0xc151a2d688 pc=0x1236db4
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).ParseBodyItem(0xc151a2e5e8, 0x49, 0xc25686c0cf, 0x6, 0x331, 0xc273f0c8c0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:133 +0x4f5 fp=0xc151a2def0 sp=0xc151a2dbe8 pc=0x1236075
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*parser).ParseBody(0xc151a2e5e8, 0xc200002404, 0x400, 0xc273f0c8c0, 0x64, 0x1)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go:46 +0x193 fp=0xc151a2e510 sp=0xc151a2def0 pc=0x1234b53
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.ParseConfig(0xc25686c000, 0x3b6, 0x400, 0xc273f0c8c0, 0x64, 0x1, 0x1, 0x0, 0x104984b, 0xc25686c000, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/public.go:21 +0x1b3 fp=0xc151a2e608 sp=0xc151a2e510 pc=0x1261023
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hclparse.(*Parser).ParseHCL(0xc151a2e7f8, 0xc25686c000, 0x3b6, 0x400, 0xc273f0c8c0, 0x64, 0xc256860870, 0x0, 0x1c93a50, 0xc000566000)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hclparse/parser.go:45 +0xda fp=0xc151a2e698 sp=0xc151a2e608 pc=0x12afdda
github.com/gruntwork-io/terragrunt/config.parseHcl(0xc151a2e7f8, 0xc255dcbc00, 0x3b6, 0xc273f0c8c0, 0x64, 0x0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config.go:467 +0x150 fp=0xc151a2e778 sp=0xc151a2e698 pc=0x195a4b0
github.com/gruntwork-io/terragrunt/config.PartialParseConfigString(0xc255dcbc00, 0x3b6, 0xc29639b080, 0x0, 0xc273f0c8c0, 0x64, 0xc151a2e8f8, 0x1, 0x1, 0xc000566000, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config_partial.go:139 +0x91 fp=0xc151a2e838 sp=0xc151a2e778 pc=0x19627d1
github.com/gruntwork-io/terragrunt/config.PartialParseConfigFile(0xc273f0c8c0, 0x64, 0xc29639b080, 0x0, 0xc151a2e8f8, 0x1, 0x1, 0xc29639b080, 0xc151a2e978, 0xc25685bd80)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config_partial.go:110 +0xb9 fp=0xc151a2e8a8 sp=0xc151a2e838 pc=0x19626b9
github.com/gruntwork-io/terragrunt/config.getDependencyBlockConfigPathsByFilepath(0xc273f0c8c0, 0x64, 0xc29639b080, 0x1, 0x2, 0xc25685bd80, 0x1, 0x2)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/dependency.go:171 +0x74 fp=0xc151a2e910 sp=0xc151a2e8a8 pc=0x19651f4
github.com/gruntwork-io/terragrunt/config.checkForDependencyBlockCyclesUsingDFS(0xc273f0c8c0, 0x64, 0xc151a2e9e8, 0xc151a2ea00, 0xc29639b080, 0x64, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/dependency.go:131 +0x214 fp=0xc151a2e988 sp=0xc151a2e910 pc=0x1964ca4
github.com/gruntwork-io/terragrunt/config.checkForDependencyBlockCycles(0xc273cb9ab0, 0x70, 0xc26c451400, 0x4, 0x4, 0x1ee94a0, 0xc2566dcbb0, 0xc29639a9a0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/dependency.go:105 +0x1e0 fp=0xc151a2eaa8 sp=0xc151a2e988 pc=0x1964a00
github.com/gruntwork-io/terragrunt/config.decodeAndRetrieveOutputs(0xc271e39240, 0xc273cb9ab0, 0x70, 0xc29639a9a0, 0xc2567745e0, 0xc256767020, 0x0, 0xc2567667a0, 0xc2567745e0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/dependency.go:72 +0x134 fp=0xc151a2eb40 sp=0xc151a2eaa8 pc=0x1964414
github.com/gruntwork-io/terragrunt/config.ParseConfigString(0xc25648ee00, 0x60a, 0xc29639a9a0, 0x0, 0xc273cb9ab0, 0x70, 0xc256734cf0, 0xc2566f6960, 0x26adb20)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config.go:356 +0x171 fp=0xc151a2ebe0 sp=0xc151a2eb40 pc=0x1959b81
github.com/gruntwork-io/terragrunt/config.ParseConfigFile(0xc273cb9ab0, 0x70, 0xc29639a9a0, 0x0, 0x0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config.go:302 +0x8c fp=0xc151a2ec38 sp=0xc151a2ebe0 pc=0x195998c
github.com/gruntwork-io/terragrunt/config.readTerragruntConfig(0xc273cb9ab0, 0x70, 0x0, 0xc29639a420, 0x1, 0x1, 0x0, 0x0, 0x1ee9fa0, 0xc0000ca199)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config_helpers.go:347 +0xe8 fp=0xc151a2eca8 sp=0xc151a2ec38 pc=0x19616e8
github.com/gruntwork-io/terragrunt/config.readTerragruntConfigAsFuncImpl.func1(0xc2566aff60, 0x1, 0x1, 0x1ee9fe0, 0x26adb20, 0x26adb20, 0x0, 0x0, 0xc256643530, 0x0, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config_helpers.go:387 +0x1df fp=0xc151a2ed38 sp=0xc151a2eca8 pc=0x196a0af
github.com/gruntwork-io/terragrunt/vendor/github.com/zclconf/go-cty/cty/function.Function.Call(0xc256734270, 0xc2566aff60, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/zclconf/go-cty/cty/function/function.go:243 +0x30c fp=0xc151a2ef08 sp=0xc151a2ed38 pc=0x11a53fc
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*FunctionCallExpr).Value(0xc2743b74a0, 0xc2566afe00, 0xc2743b74a0, 0xc2567340c0, 0xc2566af601, 0x0, 0xc2566afe00, 0xffffffffffffffff, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/expression.go:385 +0x10c3 fp=0xc151a300d0 sp=0xc151a2ef08 pc=0x12206d3
github.com/gruntwork-io/terragrunt/config.attemptEvaluateLocals(0xc29639a420, 0xc273cb9570, 0x64, 0xc1d7f66f90, 0x1, 0x1, 0xc256643b10, 0xc2567340c0, 0x1eda660, 0xc2566b1f50, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/locals.go:158 +0x488 fp=0xc151a30288 sp=0xc151a300d0 pc=0x19684d8
github.com/gruntwork-io/terragrunt/config.evaluateLocalsBlock(0xc29639a420, 0xc151a304a0, 0xc271e38ac0, 0xc273cb9570, 0x64, 0xc256643b10, 0x0, 0xc2566aedc0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/locals.go:84 +0x2a6 fp=0xc151a303a0 sp=0xc151a30288 pc=0x1967b76
github.com/gruntwork-io/terragrunt/config.DecodeBaseBlocks(0xc29639a420, 0xc151a304a0, 0xc271e38ac0, 0xc273cb9570, 0x64, 0x0, 0x0, 0x0, 0x12be6d5, 0x0, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config_partial.go:87 +0x111 fp=0xc151a30420 sp=0xc151a303a0 pc=0x1962411
github.com/gruntwork-io/terragrunt/config.PartialParseConfigString(0xc25643e580, 0x502, 0xc29639a420, 0x0, 0xc273cb9570, 0x64, 0xc151a305a0, 0x1, 0x1, 0xc000566000, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config_partial.go:145 +0xf8 fp=0xc151a304e0 sp=0xc151a30420 pc=0x1962838
github.com/gruntwork-io/terragrunt/config.PartialParseConfigFile(0xc273cb9570, 0x64, 0xc29639a420, 0x0, 0xc151a305a0, 0x1, 0x1, 0x64, 0xc151a30600, 0xc2566ae780)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config_partial.go:110 +0xb9 fp=0xc151a30550 sp=0xc151a304e0 pc=0x19626b9
github.com/gruntwork-io/terragrunt/config.getDependencyBlockConfigPathsByFilepath(0xc273cb9570, 0x64, 0xc29639a420, 0x1, 0x2, 0xc2566ae780, 0x1, 0x2)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/dependency.go:171 +0x74 fp=0xc151a305b8 sp=0xc151a30550 pc=0x19651f4
github.com/gruntwork-io/terragrunt/config.checkForDependencyBlockCyclesUsingDFS(0xc273cb9570, 0x64, 0xc151a30690, 0xc151a306a8, 0xc29639a420, 0x64, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/dependency.go:131 +0x214 fp=0xc151a30630 sp=0xc151a305b8 pc=0x1964ca4
github.com/gruntwork-io/terragrunt/config.checkForDependencyBlockCycles(0xc273a19e30, 0x70, 0xc26c450a00, 0x4, 0x4, 0x1ee94a0, 0xc2564b44d0, 0xc2960274a0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/dependency.go:105 +0x1e0 fp=0xc151a30750 sp=0xc151a30630 pc=0x1964a00
github.com/gruntwork-io/terragrunt/config.decodeAndRetrieveOutputs(0xc271cec240, 0xc273a19e30, 0x70, 0xc2960274a0, 0xc2564c22f0, 0xc256483600, 0x0, 0xc256482d80, 0xc2564c22f0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/dependency.go:72 +0x134 fp=0xc151a307e8 sp=0xc151a30750 pc=0x1964414
github.com/gruntwork-io/terragrunt/config.ParseConfigString(0xc25648e000, 0x60a, 0xc2960274a0, 0x0, 0xc273a19e30, 0x70, 0xc2564860f0, 0xc25647c140, 0x26adb20)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config.go:356 +0x171 fp=0xc151a30888 sp=0xc151a307e8 pc=0x1959b81
github.com/gruntwork-io/terragrunt/config.ParseConfigFile(0xc273a19e30, 0x70, 0xc2960274a0, 0x0, 0x0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config.go:302 +0x8c fp=0xc151a308e0 sp=0xc151a30888 pc=0x195998c
github.com/gruntwork-io/terragrunt/config.readTerragruntConfig(0xc273a19e30, 0x70, 0x0, 0xc2960271e0, 0x1, 0x1, 0x0, 0x0, 0x1ee9fa0, 0xc0000ca199)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config_helpers.go:347 +0xe8 fp=0xc151a30950 sp=0xc151a308e0 pc=0x19616e8
github.com/gruntwork-io/terragrunt/config.readTerragruntConfigAsFuncImpl.func1(0xc256482540, 0x1, 0x1, 0x1ee9fe0, 0x26adb20, 0x26adb20, 0x0, 0x0, 0xc2563c9240, 0x0, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config_helpers.go:387 +0x1df fp=0xc151a309e0 sp=0xc151a30950 pc=0x196a0af
github.com/gruntwork-io/terragrunt/vendor/github.com/zclconf/go-cty/cty/function.Function.Call(0xc256439650, 0xc256482540, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/zclconf/go-cty/cty/function/function.go:243 +0x30c fp=0xc151a30bb0 sp=0xc151a309e0 pc=0x11a53fc
github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax.(*FunctionCallExpr).Value(0xc2741de3c0, 0xc2564823e0, 0xc2741de3c0, 0xc2564394a0, 0xc25642fc01, 0x0, 0xc2564823e0, 0xffffffffffffffff, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/expression.go:385 +0x10c3 fp=0xc151a31d78 sp=0xc151a30bb0 pc=0x12206d3
github.com/gruntwork-io/terragrunt/config.attemptEvaluateLocals(0xc2960271e0, 0xc273a19960, 0x64, 0xc1d7f66dc0, 0x1, 0x1, 0xc2563c9820, 0xc2564394a0, 0x1eda660, 0xc256439350, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/locals.go:158 +0x488 fp=0xc151a31f30 sp=0xc151a31d78 pc=0x19684d8
github.com/gruntwork-io/terragrunt/config.evaluateLocalsBlock(0xc2960271e0, 0xc151a32148, 0xc271b41840, 0xc273a19960, 0x64, 0xc2563c9820, 0x0, 0xc25642f3a0, 0x0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/locals.go:84 +0x2a6 fp=0xc151a32048 sp=0xc151a31f30 pc=0x1967b76
github.com/gruntwork-io/terragrunt/config.DecodeBaseBlocks(0xc2960271e0, 0xc151a32148, 0xc271b41840, 0xc273a19960, 0x64, 0x0, 0x0, 0x0, 0x12be6d5, 0x0, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config_partial.go:87 +0x111 fp=0xc151a320c8 sp=0xc151a32048 pc=0x1962411
github.com/gruntwork-io/terragrunt/config.PartialParseConfigString(0xc2556f9700, 0x502, 0xc2960271e0, 0x0, 0xc273a19960, 0x64, 0xc151a32248, 0x1, 0x1, 0xc000566000, ...)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config_partial.go:145 +0xf8 fp=0xc151a32188 sp=0xc151a320c8 pc=0x1962838
github.com/gruntwork-io/terragrunt/config.PartialParseConfigFile(0xc273a19960, 0x64, 0xc2960271e0, 0x0, 0xc151a32248, 0x1, 0x1, 0x64, 0xc151a32200, 0xc25642ed60)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/config/config_partial.go:110 +0xb9 fp=0xc151a321f8 sp=0xc151a32188 pc=0x19626b9
...additional frames elided...

goroutine 36 [select]:
github.com/gruntwork-io/terragrunt/vendor/go.opencensus.io/stats/view.(*worker).start(0xc00011aff0)
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/go.opencensus.io/stats/view/worker.go:154 +0x100
created by github.com/gruntwork-io/terragrunt/vendor/go.opencensus.io/stats/view.init.0
        /private/tmp/terragrunt-20200222-27487-5xgze/src/github.com/gruntwork-io/terragrunt/vendor/go.opencensus.io/stats/view/worker.go:32 +0x57

goroutine 37 [syscall, 3 minutes]:
os/signal.signal_recv(0xa)
        /usr/local/Cellar/go/1.13.8/libexec/src/runtime/sigqueue.go:144 +0x96
os/signal.loop()
        /usr/local/Cellar/go/1.13.8/libexec/src/os/signal/signal_unix.go:23 +0x22
created by os/signal.init.0
        /usr/local/Cellar/go/1.13.8/libexec/src/os/signal/signal_unix.go:29 +0x41
exit status 2

Test 2: I placed the test config file in parent directory and tried to read that using the function, the code block looks like this

locals {
  db_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
}
inputs = merge(
  local.db_vars.inputs,
{
<additional inputs>
}
)

Expected Result: It to import the inputs from common.hcl Results Got: It worked as expected

Could you please help me here understanding why my Test 1 is failing , is it not a valid way to use the function read_terragrunt_config?

brikis98 commented 4 years ago

@yorinasub17 Could you take a look when you're back?

yorinasub17 commented 4 years ago

Hi can you share the contents of database/terragrunt.hcl and common.hcl?

Based on the stack trace, it appears that the HCL parser is cycling when it tries to parse out the config when it tries to read it in. It doesn't make sense to me yet why it would behave differently depending on where it is placed, although I have a few hypotheses. Either way, it is hard to evaluate what might be going on without seeing the config it is trying to read in, since the failure is in the config that is read in and not what is referenced.

chandrakanthkannam commented 4 years ago

Hi @yorinasub17 ,

Sure below are the contents of database/terragrunt.hcl

terraform{
    source = "<source>"
}

include{
    path = find_in_parent_folders()
}

dependency "vpc" {
    config_path = "../vpc"
}

dependency "ad" {
    config_path = "../ad"
}

dependency "s3" {
    config_path = "../s3"
}

dependency "scripts"{
    config_path = "../scripts"
}

inputs = {
    cluster_name              = "cluste_name"
    witness_instance_type     = "t3.small"
    witness_ami_id            = "ami-"
    database_instance_type    = "t3.medium"
    database_ami_id           = "ami-"
    domain_name               = dependency.ad.outputs.ad_domain
    domain_netbios            = dependency.ad.outputs.ad_netbios
    domain_secrets            = "<secrets-name>" //these needs to be created
    sql_secrets               = "<secrets-name>"//these needs to be created
    subnets                   = dependency.vpc.outputs.private_subnets
    config_bucket             = dependency.s3.outputs.envBucketName
    config_bucket_prefix      = "scripts"
    database_disks            = {<string>}
    disk_initializer          = dependency.scripts.outputs.scripts.name
    vpc_id                    = dependency.vpc.outputs.vpc_id
}

and here is the common.hcl:

inputs = {
    cluster_name              = "cluste_name"
    witness_instance_type     = "t3.small"
    witness_ami_id            = "ami-"
    database_instance_type    = "t3.medium"
    database_ami_id           = "ami-"
}

Could this because the terragrunt.hcl in database module has inputs which are dependent on some other modules?

yorinasub17 commented 4 years ago

Thanks for sharing that! However, as you suggested, I think I need to keep seeing up the dependency tree 😅

It does look like the HCL parser is blowing up on reading one of the dependencies, and not the database config. The reason is that the stack trace suggests a blow up in the HCL parser related to an expression that:

Is there a config in your dependency tree that matches this criteria? If so, can you share that so I can get a sense of how deep the expressions go and file the necessary issue to the HCL parser?

Also, is terragrunt able to manage the database config by itself? If so, this is unlikely, but then possibly the extra calls added to the stack from going through read_terragrunt_config might be what caused the stack overflow and you were already close to the limit in the config.

Thanks!

chandrakanthkannam commented 4 years ago

Yes @yorinasub17, in the database config dependencies one of them has condition in their inputs and here is that file:

terraform{
    source = "<source>"
}

include{
    path = find_in_parent_folders()
}

dependency "vpc" {
    config_path = "../vpc"
}

inputs = {
    vpc_id = dependency.vpc.outputs.vpc_id
    subnet_ids = length(dependency.vpc.outputs.private_subnets) >= 3 ? ["${element(dependency.vpc.outputs.private_subnets,1)}","${element(dependency.vpc.outputs.private_subnets,2)}"] : dependency.vpc.outputs.private_subnets
    mgmt_public_subnet_id = length(dependency.vpc.outputs.private_subnets) >= 1 ? ["${element(dependency.vpc.outputs.private_subnets,0)}"] : dependency.vpc.outputs.private_subnets
    mgmt_private_subnet_id = length(dependency.vpc.outputs.private_subnets) >= 1 ? ["${element(dependency.vpc.outputs.private_subnets,0)}"] : dependency.vpc.outputs.private_subnets
    mgmt_public_ip = true
    domain_admin = "<username>"
    ssm_parameter_store_name = "<store_name>"
}

Also, is terragrunt able to manage the database config by itself? ---> Yes, if i apply the database config file it's going through with out any error.

yorinasub17 commented 4 years ago

Thanks for your response. I still need to dig deeper into this, but so far I haven't found anything that is causing this or been able to repro.

With that said, a quick sanity check: is it possible that you have an accidental cyclic dependency? The reason is that I was looking at the log again and it looks like:

read_terragrunt_config => dependency => read_terragrunt_config => dependency ...

Since I can't see the second read_terragrunt_config, I was just wondering if you had accidentally cycled. It would also help knowing how deep your links are: how many chains of dependencies and read_terragrunt_config do you have?

amasover commented 4 years ago

I see something similar, with a setup like this:

(the parent) environment/terragrunt.hcl:

locals {
  child_config = read_terragrunt_config("${get_terragrunt_dir()}/terragrunt.hcl")
}
terraform {
  before_hook "child-config" {
    commands = ["init"]
    execute = ["bash", "-c", "echo ${local.child_config}"]
  }
}

(the child) environment/module/terragrunt.hcl:

terraform {
  source = "git@somegitrepository//mymodule"
}

include {
  path = find_in_parent_folders()
}

Seems like maybe a cyclic dependency of child -> parent -> child -> parent ?

My use case is to know the value of source from the child terragrunt.hcl without parsing it out myself.

yorinasub17 commented 4 years ago

Ah yes that is not supported. The infinite loop is:

Since we aren't doing anything fancy with the parsing (e.g., partial parsing and recursing), this can't be handled properly.

We should definitely have cycle detection with read_terragrunt_config like dependency blocks though. I am a bit buried at the moment and most likely will not get to anything like that soon.


My use case is to know the value of source from the child terragrunt.hcl without parsing it out myself.

This is probably not a use case we are going to support any time soon, since you basically want a global namespace between the parent and the child for ALL attributes (not just globals, a theoretical block that was discussed in the past, or locals). You will most likely have to wait for https://github.com/gruntwork-io/terragrunt/issues/759 to be implemented.

That said, what do you want to do with the source? There might be other workarounds that break the cycle.

amasover commented 4 years ago

This is probably not a use case we are going to support any time soon

No worries, I think I can manage for now :)

That said, what do you want to do with the source? There might be other workarounds that break the cycle.

I have some hooks that I'd like to run for all modules except one. The module folder name in my Terragrunt environment structure can vary. For example, it could be either of these:

environment/module/terragrunt.hcl
environment2/module-with-different-name/terragrunt.hcl

But the source would be the same for both of those. So I can't use get_terragrunt_dir() to parse the path, but if I know what's past the // in source, then I can decide whether or not my hook should fire.

If there are other workarounds, or a better way to do things, I definitely appreciate the help.