diff --git a/website/docs/cli/config/config-file.mdx b/website/docs/cli/config/config-file.mdx index accdc465fc..c3884f683d 100644 --- a/website/docs/cli/config/config-file.mdx +++ b/website/docs/cli/config/config-file.mdx @@ -387,7 +387,7 @@ grow to contain several unused versions which you must delete manually. safe. The provider installer's behavior in environments with multiple `terraform init` calls is undefined. -## Allowing the Provider Plugin Cache to break the dependency lock file +### Allowing the Provider Plugin Cache to break the dependency lock file ~> **Note:** The option described in is for unusual and exceptional situations only. Do not set this option unless you are sure you need it and you fully @@ -415,6 +415,10 @@ to confirm it: plugin_cache_may_break_dependency_lock_file = true ``` +Alternatively, you can set the environment variable +`TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE` to any value other than the +empty string or `0`, which is equivalent to the above setting. + Setting this option gives Terraform CLI permission to create an incomplete dependency lock file entry for a provider if that would allow Terraform to use the cache to install that provider. In that situation the dependency lock diff --git a/website/docs/cli/config/environment-variables.mdx b/website/docs/cli/config/environment-variables.mdx index 807c5349e5..078e15a0fc 100644 --- a/website/docs/cli/config/environment-variables.mdx +++ b/website/docs/cli/config/environment-variables.mdx @@ -151,6 +151,12 @@ The location of the [Terraform CLI configuration file](/terraform/cli/config/con export TF_CLI_CONFIG_FILE="$HOME/.terraformrc-custom" ``` +## TF_PLUGIN_CACHE_DIR + +The `TF_PLUGIN_CACHE_DIR` environment variable is an alternative way to set [the `plugin_cache_dir` setting in the CLI configuration](/terraform/cli/config/config-file#provider-plugin-cache). + +You can also use `TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE` to activate [the transitional compatibility setting `plugin_cache_may_break_dependency_lock_file`](/terraform/cli/config/config-file#allowing-the-provider-plugin-cache-to-break-the-dependency-lock-file). + ## TF_IGNORE If `TF_IGNORE` is set to "trace", Terraform will output debug messages to display ignored files and folders. This is useful when debugging large repositories with `.terraformignore` files.