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

hook createstackmoduleoutputs fails if the module is located in subdir of a git repo #13

Open
helgard88 opened this issue May 9, 2024 · 2 comments

Comments

@helgard88
Copy link

In case I specify a subdirectory and a tag ref in a module source like git::https://example.com/network.git//modules/vpc?ref=v1.2.0 the ref gets copied into stackmodulesoutputs file with a module name. As a result I get something like
output "module_vpc?ref=v1.2.0" { value = module.vpc?ref=v1.2.0.* sensitive = true }

hasGitRef = fileName.index('.git?ref')

Does it expect ref right after .git ?

@tbugfinder
Copy link
Collaborator

Could you confirm that // always is the delimiter for referenced subdirectories?

@helgard88
Copy link
Author

@tbugfinder thank you for the response!
// is also used as a delimiter of a protocol in URL. But it is always used to specify a subdirectory when it stands after .git. You can see it in the example that I provided in the first comment. The issue is that the subdirectory can not be specified after the tag reference.
Here is an official guide to how submodules should be used.

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

No branches or pull requests

2 participants