You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
terraform init should clone the repo one time and use the single repo for all aliases of the module or at least same
as for the local modules only create one hash link for each alias to one clone of the repo.
Actual Behavior
for each module alias a speparate directory is created and git clone of the same repo is called.
Steps to Reproduce
add the code above to your main.tf file (change the repo url to a valid url of a module you have access too)
run terraform init
look into .terraform/modules (for each alias you will find one full clone of the repo)
this is a waste of space and very imperformant. if you create your server with module aliases, you have for example 30 clones of the same repo in your .terraform/modules path. additional cloning so many repos takes time.
if you use local modules source = "./modules/hcloud-server" this does not happen because the hashes link from .terraform/modules/<hash_for_the_alias> to ./modules/hcloud-server
The text was updated successfully, but these errors were encountered:
It looks like you're describing the same thing as discussed in #11435, which has already been fixed in the master branch ready for inclusion in the forthcoming v0.12.0 release. You can find a comment from me on that other issue with details of how this now behaves.
In particular, you'll note that for the first pass we intentionally addressed only the problem of downloading multiple times and retained the multiple copies because this avoids the risk of breaking anyone who was assuming that each module has its own separate installation directory. We don't plan to change that in the short term until we get more experience with the new behavior, but we do plan to look into optimizations for local storage in a later release too, most likely as part of some other general changes to how Terraform manages dependencies, still to be fully designed.
Since the change for this is already merged, I'm going to close this issue. Thanks for reporting this!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Mar 30, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
Terraform Configuration Files
Expected Behavior
terraform init
should clone the repo one time and use the single repo for all aliases of the module or at least sameas for the local modules only create one hash link for each alias to one clone of the repo.
Actual Behavior
for each module alias a speparate directory is created and git clone of the same repo is called.
Steps to Reproduce
terraform init
.terraform/modules
(for each alias you will find one full clone of the repo)this is a waste of space and very imperformant. if you create your server with module aliases, you have for example 30 clones of the same repo in your
.terraform/modules
path. additional cloning so many repos takes time.if you use local modules
source = "./modules/hcloud-server"
this does not happen because the hashes link from.terraform/modules/<hash_for_the_alias>
to./modules/hcloud-server
The text was updated successfully, but these errors were encountered: