This file uses commands to load common.tfvars
and regional.tfvars
However, it seems to have a problem loading this common.tfvars in when it runs, saying it can't find common.tfvars.
Call to function "find_in_parent_folders" failed
I just tried navigating into the region level directory under the "parent" terragrunt.hcl file.
It errored out and no detail on error, just this
time=2021-04-16T12:39:14-05:00 level=error msg=Encountered the following errors:
Hit multiple errors:
Hit multiple errors:
exit status 127
It also generated a backend file in the "parent" directory that has the common variables, but is not the individual region's section.
When I copied the debug command output and run the command below it plans fine.
terraform plan -var-file="/Users/sheldonhull/git/repo/terragrunt/staging/eu-central-1/vpc/terragrunt-debug.tfvars.json" "/Users/sheldonhull/git/repo/terragrunt/staging/eu-central-1/vpc/.terragrunt-cache/QaAhZIo4_imktYigJ0DeKyQKkDk/ky_VpYadOztK_rvSkFtkAnFs6aY/modules/vpc"
This is a bit confusing as new terragrunt user.
I'm not seeing the native terraform commands exposed easily to know what happened, it's just outputting the terraform help content.
The error doesn't even show the actual terraform init/plan command, just this:
DEBU[0001] Run this command to replicate how terraform was invoked: prefix=[/Users/sheldonhull/git/repo/terragrunt/staging/eu-central-1/vpc]
DEBU[0001] terraform -var-file="/Users/sheldonhull/git/git/repo/terragrunt/staging/eu-central-1/vpc/terragrunt-debug.tfvars.json" "/Users/sheldonhull/git/terragrunt/staging/eu-central-1/vpc/.terragrunt-cache/QaAhZIo4_imktYigJ0DeKyQKkDk/ky_VpYadOztK_rvSkFtkAnFs6aY/modules/vpc" prefix=[/Users/sheldonhull/git/repo/terragrunt/staging/eu-central-1/vpc]
panic: runtime error: index out of range [0] with length 0
goroutine 19 [running]:
github.com/gruntwork-io/terragrunt/options.(*TerragruntOptions).InsertTerraformCliArgs(0xc000365dc0, 0x2848b78, 0x0, 0x0)
github.com/gruntwork-io/terragrunt/options/options.go:296 +0x37c
github.com/gruntwork-io/terragrunt/cli.runTerragruntWithConfig(0xc0003b4700, 0xc000365dc0, 0xc000894000, 0x0, 0xf, 0x0)
github.com/gruntwork-io/terragrunt/cli/cli_app.go:620 +0xae
github.com/gruntwork-io/terragrunt/cli.RunTerragrunt(0xc0003b4700, 0x5, 0x1f21e28)
github.com/gruntwork-io/terragrunt/cli/cli_app.go:474 +0x85c
github.com/gruntwork-io/terragrunt/configstack.(*runningModule).runNow(0xc0002e8820, 0xc000149f5f, 0x0)
github.com/gruntwork-io/terragrunt/configstack/running_module.go:243 +0x185
github.com/gruntwork-io/terragrunt/configstack.(*runningModule).runModuleWhenReady(0xc0002e8820, 0xc0000a83c0)
github.com/gruntwork-io/terragrunt/configstack/running_module.go:206 +0xd5
github.com/gruntwork-io/terragrunt/configstack.runModules.func1(0xc00088a410, 0xc0000a83c0, 0xc0002e8820)
github.com/gruntwork-io/terragrunt/configstack/running_module.go:172 +0x5d
created by github.com/gruntwork-io/terragrunt/configstack.runModules
github.com/gruntwork-io/terragrunt/configstack/running_module.go:170 +0x11b
Directory Structure
.
โโโ README.md
โโโ Taskfile.yml
โโโ modules
โ โโโ aws-data
โ โ โโโ README.md
โ โ โโโ main.tf
โ โ โโโ outputs.tf
โ โ โโโ versions.tf
โ โโโ vpc
โ โโโ README.md
โ โโโ label.tf
โ โโโ outputs.subnets.tf
โ โโโ outputs.vpc.tf
โ โโโ variables.common.tf
โ โโโ variables.stack.tf
โ โโโ versions.tf
โ โโโ vpc.tf
โโโ terragrunt
โ โโโ staging <<<<<<<<<<< THIS IS MY WORKING DIRECTORY, running terragrunt from this context
โ โโโ Taskfile.yml
โ โโโ common.tfvars <---- NEVER SEES TO FIND THIS
โ โโโ eu-central-1 <---- navigating into this subdirectory and running doesn't change it's ability to find the common.tfvars
โ โ โโโ regional.tfvars
โ โ โโโ vpc
โ โ โโโ terragrunt-debug.tfvars.json
โ โ โโโ terragrunt.hcl
โ โโโ global <---- not doing anything with it, they are all commented out for now
โ โ โโโ iam-account
โ โ โ โโโ terragrunt.hcl
โ โ โโโ iam-assumable-roles
โ โ โ โโโ terragrunt.hcl
โ โ โโโ regional.tfvars
โ โโโ terragrunt.hcl <---- what i'm calling "ROOT" so I can "run-all" against all the pieces in this stack