-
-
Notifications
You must be signed in to change notification settings - Fork 642
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
Caching for Terraform! #21221
Caching for Terraform! #21221
Conversation
091b1a2
to
c7f1b46
Compare
|
||
path = [] | ||
user_path = env.get("PATH") | ||
if user_path is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edge case, but you probably don't want to append a blank PATH
value either. Maybe just use if user_path:
here then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point! We should centralise merging envvars at some point, I think there are a few subsystems that allow a passthrough of envvars in some way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a common env vars helper in the adhoc / shell backends via the prepare_env_vars
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parts of that method might be useful elsewhere in the future.
23644ce
to
6a77c94
Compare
`terraform providers mirror` is really intended to easily spin up a network mirror, not so much for cacheing
allows `init` to cache plugins automatically
6a77c94
to
5ea8e70
Compare
This MR adds caching for Terraform! specifically the providers, which is the thing you need to download. It uses the provider cache.
Pulling in "hashicorp/azurerm" "hashicorp/azuread" (total 200M) goes from 22s to 2s (33s to 13s including pants startup).