Open hannes-ucsc opened 4 weeks ago
Assignee to provide reproduction, ideally including evidence for the amount of duplication in each directory.
Assignee to consider next steps.
We should set TF_PLUGIN_CACHE_DIR to ${project_root}/.terraform/cache/plugins
. Note that the directory has to exist for Terraform to use it, so the commit must include a regular, empty file at ${project_root}/.terraform/cache/plugins/.gitkeep
. Running make clean
from the project root should not delete the contents of ${project_root}/.terraform/cache/plugins
. The PR author should be able to achieve this simply by mentioning that directory in the top-level .gitignore
file, in the right place.
For developers with more than one clone of Azul, this solution would still waste space by keeping redundant copies of plugins but I like the idea of complete separation between Azul clones. In a perfect world all clones could share the TF plugins but bugs in TF's plugin cache handling could interfere with, say, the ability to concurrently run make deploy
from two different clones. This is consistent with how we manage Python virtual envs, which are also kept within the project root, though, at this time, we won't provide a Makefile target to manage the TF plugin cache.
To reproduce, run the following command from your local Azul repository, within the
deployments
directory:This list adds up to 4052MB.
In some instances when different provider versions have been used, the managed deployment includes a provider for each of the versions used (or that it may have used in the past).