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

many instances of a module (git) download from git each time #17226

Closed
gtmtech opened this issue Jan 29, 2018 · 3 comments
Closed

many instances of a module (git) download from git each time #17226

gtmtech opened this issue Jan 29, 2018 · 3 comments

Comments

@gtmtech
Copy link

gtmtech commented Jan 29, 2018

Terraform 0.11.1

I have a submodule which I instantiate several times e.g.:

module "foo_a" {
    source  = "git::ssh://[email protected]/mycompany/ha_asg.git"
}

module "foo_b" {
    source  = "git::ssh://[email protected]/mycompany/ha_asg.git"
}

module "foo_c" {
    source  = "git::ssh://[email protected]/mycompany/ha_asg.git"
}

Disappointingly when I run terraform init, this is very slow because for each of foo_a, foo_b, foo_c, etc. - terraform downloads the whole git source again. Can't it instead work out that it needs that source once, and download it once?

I run a terraform init on each terraform command, so the slowness is exacerbated a bit.

Thanks!

@leftathome
Copy link

If you are using CI and make heavy use of modules, this adds a lot of time to each deploy. (Even if you do cache WORKING_DIRECTORY/.terraform/modules, which can sometimes present its own set of problems...)

@apparentlymart
Copy link
Contributor

Hi @gtmtech! Thanks for reporting this.

This seems to be the same thing being discussed over in #11435, so I'm going to close this just to consolidate the discussion over there.

@ghost
Copy link

ghost commented Apr 3, 2020

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 ghost locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants