-
Notifications
You must be signed in to change notification settings - Fork 106
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
Minimal Example #198
base: master
Are you sure you want to change the base?
Minimal Example #198
Conversation
} | ||
|
||
terraform { | ||
source = "${find_in_parent_folders()}/../../..//modules/subdir/resource" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intended to have a double slash? @Chancebair
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the double slash tells terragrunt that this is a subdir so that when modules are imported you don't import the entire repository into the terragrunt cache folder: https://www.terraform.io/language/modules/sources#modules-in-package-sub-directories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding has been that the //
subdir is only used for remote data sources. Of the four examples on that site,
hashicorp/consul/aws//modules/consul-cluster
is on the remote registrygit::https://example.com/network.git//modules/vpc
uses git/httpshttps://example.com/network-module.zip//modules/vpc
uses httpss3::https://s3-eu-west-1.amazonaws.com/examplecorp-terraform-modules/network.zip//modules/vpc
uses S3
What is the reason for using the slashes locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not using the double slash causes: "Error: Unreadable module directory: Unable to evaluate directory symlink" it's used to designate the local module root directory. I'll try removing it in this PR as an example
Pull Request
Adding in what I'm hoping is an equivalent example
Related Github Issues
Description
TODO
Security Implications
System Availability