Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Minimal Example #198

wants to merge 2 commits into from

Conversation

Chancebair
Copy link

@Chancebair Chancebair commented Feb 14, 2022

Pull Request

Adding in what I'm hoping is an equivalent example

Related Github Issues

Description

TODO

Security Implications

  • [none]

System Availability

  • [none]

}

terraform {
source = "${find_in_parent_folders()}/../../..//modules/subdir/resource"
Copy link
Member

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

Copy link
Author

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

Copy link
Member

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 registry
  • git::https://example.com/network.git//modules/vpc uses git/https
  • https://example.com/network-module.zip//modules/vpc uses https
  • s3::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?

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants