-
Notifications
You must be signed in to change notification settings - Fork 53
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
Speed up by caching plugins and providers #141
Comments
Some providers are versioned and people might request two different versions of the same provider. Do we account for that? Just a question. |
Yeah terraform names the plugin files depending on the version so we can have multiple files cached and tf will just use whatever version it needs |
can we not just use https://www.terraform.io/docs/configuration/providers.html#provider-plugin-cache ? |
Nice! I didn't know that was possible. I think it probably makes sense to always execute |
This issue was migrated to runatlantis/atlantis#34. Read about why here. |
With the latest terraform >= 0.9 providers come as plugins that need to be downloaded. Right now, we're using
terraform init
which downloads the plugins into the current directory under.terraform/plugins/{os}_{runtime}
for every project.If we move the downloaded plugin to
~/.terraform.d/plugins/
(or~/.terraform.d/plugins/{os}_{runtime}
then terraform won't download the plugin again for any project.So my proposed solution is:
terraform init
, check if there are any files in{pwd}/.terraform/plugins/os_runtime
other thanlock.json
. If so, move all of them to~/.terraform.d/plugins/
.Now tf will check
~/.terraform.d/plugins/
before downloading any plugins so it will be back up to speed. Since tf will download any plugins that aren't already existing, we can rely on it to do the downloading.The text was updated successfully, but these errors were encountered: