- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Symlinks in Terragrunt #1611
Comments
Ah, my guess is that the |
Hi. I'm new with Terraform and Terragrunt. I started playing with it for few days only. My first project directory structure was as follows.
It works just fine but I had duplicated
What I wanted was to remove the duplicated So I created The project directory structure became:
It was too simple, when I ran
I thought I was toasted but eventually I found another library (facebookgo/symwalk) which supports Walk with symbolic links. I decided to patch Terragrunt with the library.
Then I ran Et Voila! Finally I can run
The only issue with that is that I'm wondering whether it could be possible to patch Terragrunt as shown above and add a flag or a global Terragrunt config to allow following symlinks when running For the time being I'm gonna use my Terragrunt patch/fork to go further in my exploring project with Terraform and Terragrunt. I hope this message helped someone. Regards Terragrunt: v0.36.3 |
Hello all, Any priority on this , I followed instructions provided by @mickael-ange and it really helped to address the issue, however with symlinks, the overall resource creation slowed down , and I think this is more of a The way I approached the config:
env.hcl
And the wrapper script
This way I just symlinked the terragrunt part , and it works without any issues, |
Here's a library that implements a walk that follow symbolic links but avoid visiting directories more than once. |
Please have a look to #3101 |
I still have problem with symlinks like below:
When I go directly into |
I can confirm symlinks are not working.
And finally running from a parent folder:
|
Note that symlinks have been downgraded to an experiment due to regressions caused by supporting it: Make sure you're enabling the experiment if you'd like to use it. |
Yes, it works with below export:
Thanks for information. |
Hi!
I have found that Terragrunt does not work with symlinks as expected. Or expected but just in a different way from Terraform.
For example, lets assume that we have such folders structure:
Now, when I am trying to run
~/cloudfront_development$ terragrunt run-all plan
it fails with an error:But commands
~/cloudfront_development$ terragrunt plan
and~/cloudfront_development/stage$ terragrunt plan
separatelly works fine.When I have navigated to
/aaa/bbb/ccc/cloudfront/development
directly and then run$ terragrunt run-all plan
then it worked.Also, I was trying to get rid of Terraform modules declaration and to declare scripts sources in the Terragrunt configuration
terraform
block:replace modules.tf
with terragrunt.hcl
But
~/cloudfront_development/stage$ terragrunt plan
has also exited with error:As you can see, the Terraform is recognizing the source path correctly even when running its commands from the symlink location.
So is it an expected behavior with symlinks in Terragrunt?
The text was updated successfully, but these errors were encountered: