You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
I have the following directory structure where the terraform modules are in a specific folder and the terragrunt files reference those modules from an environment/region path.
The lower level terragrunt.hcl files from each environment/region reference the parent terragunt.hcl at the root level.
I am using the following kitchen.ymljust to kick tires.
D Message: Running the command `/Users/user1/repos/tf-gcloud/terragrunt_darwin_amd64 version` failed due to a non-zero exit code of 1.
D ----------------------
D ------Backtrace-------
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/kitchen-terraform-5.8.0/lib/kitchen/terraform/raise/action_failed.rb:32:in `call'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/kitchen-terraform-5.8.0/lib/kitchen/driver/terraform.rb:191:in `rescue in destroy'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/kitchen-terraform-5.8.0/lib/kitchen/driver/terraform.rb:188:in `destroy'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:495:in `public_send'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:495:in `block in perform_action'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:560:in `block in synchronize_or_call'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:558:in `synchronize'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:558:in `synchronize_or_call'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:524:in `block in action'
D /Users/user1/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/benchmark.rb:293:in `measure'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:523:in `action'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:495:in `perform_action'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:482:in `destroy_action'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:392:in `block (2 levels) in transition_to'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/lifecycle_hooks.rb:47:in `run_with_hooks'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:391:in `block in transition_to'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:390:in `each'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:390:in `transition_to'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:172:in `destroy'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:188:in `block in test'
D /Users/user1/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/benchmark.rb:293:in `measure'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/instance.rb:186:in `test'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/command.rb:195:in `public_send'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/command.rb:195:in `run_action_in_thread'
D /Users/user1/.rvm/gems/ruby-2.7.2/gems/test-kitchen-2.11.2/lib/kitchen/command.rb:166:in `block (2 levels) in run_action'
D ----End Backtrace-----
If I run terragrunt version from the local binary in the relative path i get the following...
06-2-21 11:00:29 tf-gcloud git:(dev) ✗ $ ./terragrunt_darwin_amd64 version
Error: Invalid index
on /Users/user1/repos/tf-gcloud/terragrunt.hcl line 2, in locals:
2: env_name = split("/", path_relative_to_include())[1]
The given key does not identify an element in this collection value.
ERRO[0000] Encountered error while evaluating locals.
ERRO[0000] /Users/user1/repos/tf-gcloud/terragrunt.hcl:2,52-55: Invalid index; The given key does not identify an element in this collection value.
ERRO[0000] Unable to determine underlying exit code, so Terragrunt will exit with error code 1
This is because terragrunt is trying to validate the root terragunt.hcl which is not intended since the plan/appy are executed within the environment/region terragrunt files.
Maybe kitchen-terraform needs to run ./terragrunt<binary> --version?
The text was updated successfully, but these errors were encountered:
Unfortunately, terragrunt --version only returns the version of Terragrunt, while terragrunt version runs the command terraform --version (not terraform version 🤷🏼) and provides the information that we need to confirm compatibility with Kitchen-Terraform. Could you work around this issue by including an empty terragrunt.hcl file in the root directory?
I was thinking on leveling the tree down one level so the root is only with that empty terragrunt.hcl and kitchen.yml and the actual parent reusable terragrunt.hcl goes down 1 level.
I have the following directory structure where the
terraform modules
are in a specific folder and the terragrunt files reference those modules from anenvironment/region
path.The lower level
terragrunt.hcl
files from each environment/region reference the parentterragunt.hcl
at the root level.I am using the following
kitchen.yml
just to kick tires.I am getting the following error:
If I run
terragrunt version
from the local binary in the relative path i get the following...This is because
terragrunt
is trying to validate the root terragunt.hcl which is not intended since theplan/appy
are executed within theenvironment/region
terragrunt files.Maybe
kitchen-terraform
needs to run./terragrunt<binary> --version
?The text was updated successfully, but these errors were encountered: