Move Terraform Providers to Other Folders
Create a new control file with the name .terraformrc or terraform.rc in your profile folder.
Add the following line:
plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"
Create the folder .terraform.d/plugin-cache in your profile folder.
The providers will be downloaded to the cache folder when you run terraform init.
If you don't want to create the control file in the profile folder. The alternative is to create an environment variable.
export TF_PLUGIN_CACHE_DIR="$HOME/.terraform.d/plugin-cache"