-
-
Notifications
You must be signed in to change notification settings - Fork 1k
get_parent_terragrunt_dir() returns wrong path #756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you share the contents of the |
Sure, this is from the child include {
path = find_in_parent_folders()
} |
Thanks I was able to reproduce this and this is indeed a bug. Will start working on a fix. |
Actually, I just realized that this was a misunderstanding on my part. After starting the implementation and digging deeper into the code and rereading our docs, I realized that the Instead, you should actually reuse |
I can see a function that returns the absolute path to the parent terragrunt config folder being useful, so I will keep this open, but since there is a workaround, I will not be implementing that at the moment. I might pick this up again if I have time in a few weeks. |
Is this the same issue fixed by #753? |
Ah I think you are right @brikis98 ! When I was digging in, I was seeing that |
Could you give https://github.com/gruntwork-io/terragrunt/releases/tag/v0.19.5 a shot (new binaries should show up shortly)? |
Hi,
my parent terragrunt.hcl has something like this:
as locals are not propagated to child terragrunt.hcl I have to parse the yaml file again. So my child terragrunt.hcl looks like
when running terragrunt plan within the child working directory everything runs smooth. But when doing a terragrunt plan-all from the parent dir, it breaks (replaced the full path output with placeholders):
|
Ah there is a known issue where you can't use the terragrunt directory related features in The goal is to introduce a concept like |
This is now fixed in https://github.com/gruntwork-io/terragrunt/releases/tag/v0.20.0 |
Hi,
I'm currently in the process of upgrading our Terragrunt/Terraform setup.
We have the following folder structure:
We have hooks in the parent
terragrunt.hcl
as well as in theterragrunt.hcl
in theworkloads
folder.Our hook (defined in the child terragrunt.hcl) should run a script in the global folder but fails as the wrong path is provided by
get_parent_terragrunt_dir()
. This is the hook definition:This fails as
get_parent_terragrunt_dir()
returns/environments/core/workloads
instead of/
.I've created a test hook with both interpolations:
This is the output:
I've tried both from the parent file with
terragrunt plan-all
and withterragrunt
in theworkloads
folder.The text was updated successfully, but these errors were encountered: