The Terraform configuration must be valid before initialization so that Terraform can determine which modules and providers need to be installed. code example

Example: enable provider plugin cache in terraform

To enable the plugin cache, use the plugin_cache_dir 
setting in the CLI configuration file

 <plugin_cache_dir> = "$HOME/.terraform.d/plugin-cache"

Environmental Variable used to enable Plugin:---->
  
 <TF_PLUGIN_CACHE_DIR environment variable> 
 can be used to enable caching or to override an existing cache directory 
 within a particular shell session.

Tags:

Html Example