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
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
As a platform engineer, I use atlantis to create plans across huge numbers of modules (sometimes hundreds) in parallel. Terraform is configured in a way that it doesn't need to fetch providers from the internet -- it fetches it from a filesystem mirror instead. Since Atlantis configures TF_PLUGIN_CACHE_DIR environment variable, the providers will get symlinked to workspaces. Unfortunately, terraform init running while other modules are already running terraform plan fails because it opens the provider binaries in the cache for writing as well, making it almost impossible for most of the plans to succeed.
Describe the solution you'd like
An option to disable the shared plugin cache would allow to avoid the race condition between terraform init and terraform plan.
Describe the drawbacks of your solution
Without a shared cache, providers need to be fetched from the mirror for every workspace, consuming more disk space and I/O bandwidth. In case of misconfiguration, there is a risk of extraneous requests to network terraform mirrors.
Create a terraform wrapper that would explicitly unset TF_PLUGIN_CACHE_DIR before exec-ing into terraform. This is a fairly awkward and fragile solution.
The text was updated successfully, but these errors were encountered:
Community Note
Describe the user story
As a platform engineer, I use atlantis to create plans across huge numbers of modules (sometimes hundreds) in parallel. Terraform is configured in a way that it doesn't need to fetch providers from the internet -- it fetches it from a filesystem mirror instead. Since Atlantis configures
TF_PLUGIN_CACHE_DIR
environment variable, the providers will get symlinked to workspaces. Unfortunately,terraform init
running while other modules are already runningterraform plan
fails because it opens the provider binaries in the cache for writing as well, making it almost impossible for most of the plans to succeed.Describe the solution you'd like
An option to disable the shared plugin cache would allow to avoid the race condition between
terraform init
andterraform plan
.Describe the drawbacks of your solution
Without a shared cache, providers need to be fetched from the mirror for every workspace, consuming more disk space and I/O bandwidth. In case of misconfiguration, there is a risk of extraneous requests to network terraform mirrors.
Describe alternatives you've considered
TF_PLUGIN_CACHE_DIR
beforeexec
-ing into terraform. This is a fairly awkward and fragile solution.The text was updated successfully, but these errors were encountered: