Would like help understanding Terragrunt behavior #702
Unanswered
nicholasarvelo
asked this question in
Help
Replies: 1 comment 2 replies
-
Hi, In my tests:
References: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Terragrunt code I am sharing does what I want it to do. However, I am not 100% certain I understand why it is working. It doesn't align with what I understand from reading Gruntwork.io's documentation. I was hoping someone could help me better understand.
This is my directory structure:
The contents of
terragrunt.hcl
:The contents of
environment_variables.hcl
:The contents of
backend_configuration.hcl
:As I already mentioned above, everything is working. Meaning:
terragrunt.hcl
adopts the configuration details from the two parent Terragrunt configuration files.backend.tf
is dynamically created with the expected key value.environment
evaluates todevelopment
and is exported for Terraform interpolation.So, this is my question:
Per Gruntwork's documentation:
This would lead me to believe that in order for
environment
to evaluate todevelopment
, I should be settingto
However this is not the resulting behavior. Setting it this way evaluates to
terragrunt
.It only generates the desired result if set to:
or, interestingly, if set to:
I would expect to fail with the latter example since there is no
terragrunt.hcl
.Can someone help me understand why it is behaving as such?
Tracked in ticket #110128
Beta Was this translation helpful? Give feedback.
All reactions