website: Document TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE env var

This is an alternative way to set the CLI configuration setting
plugin_cache_may_break_dependency_lock_file to activate the transitional
compatibility behavior that prefers to break the dependency lock file if
that would create an additional opportunity to use the plugin cache.
This commit is contained in:
Martin Atkins 2023-03-01 09:15:36 -08:00
parent e793729602
commit 2a1d98bc06
2 changed files with 11 additions and 1 deletions

View File

@ -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 safe. The provider installer's behavior in environments with multiple `terraform
init` calls is undefined. 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 ~> **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 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 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 Setting this option gives Terraform CLI permission to create an incomplete
dependency lock file entry for a provider if that would allow Terraform to 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 use the cache to install that provider. In that situation the dependency lock

View File

@ -151,6 +151,12 @@ The location of the [Terraform CLI configuration file](/terraform/cli/config/con
export TF_CLI_CONFIG_FILE="$HOME/.terraformrc-custom" 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 ## 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. 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.