Storage optimizations#
Provider plugin cache#
Allow Terraform the use of a local directory as a shared plugin cache,
which then allows each distinct plugin binary to be downloaded only once,
instead of downloading it to separate .terraform folder in each root module.
plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"OR
export TF_PLUGIN_CACHE_DIR="$HOME/.terraform.d/plugin-cache"References:
Cleanup of .terraform folders#
find ./ -type d -name ".terraform" -exec rm -rf {} + - remove all .terraform folders recursively from the current folder