opentofu/internal/command/cliconfig
Martin Atkins e2380b1038 cliconfig: Allow forcing use of the plugin cache despite the lock file
Currently Terraform will use an entry from the global plugin cache only if
it matches a checksum already recorded in the dependency lock file. This
allows Terraform to produce a complete lock file entry on the first
encounter with a new provider, whereas using the cache in that case would
cause the lock file to only cover the single package in the cache and
thereefore be unusable on any other operating system or CPU architecture.

This temporary CLI config option is a pragmatic exception to support those
who cannot currently correctly use the dependency lock file but who still
want to benefit from the plugin cache. With this setting enabled,
Terraform has permission to produce a dependency lock file that is only
suitable for the current system if that would allow use of an existing
entry in the plugin cache.

We are introducing this option to resolve a conflict between the needs of
folks who are using the dependency lock file as expected and the needs of
folks who cannot use the dependency lock file for some reason. The hope
then is to give respite to those who need this exception in the meantime
while we understand better why they cannot use the dependency lock file
and improve its design so that everyone will be able to use it
successfully in a future version of Terraform. This option will become a
silent no-op in a future version of Terraform, once the dependency lock
file behavior is sufficient for all supported Terraform development
workflows.
2023-01-25 08:23:01 -08:00
..
testdata Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
cliconfig_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
cliconfig.go cliconfig: Allow forcing use of the plugin cache despite the lock file 2023-01-25 08:23:01 -08:00
config_unix.go Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
config_windows.go Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
credentials_test.go fix(creds): allow periods in TF_TOKEN_... credentials vars 2022-04-15 12:38:14 -06:00
credentials.go fix(creds): allow periods in TF_TOKEN_... credentials vars 2022-04-15 12:38:14 -06:00
provider_installation_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
provider_installation.go build: Use Go 1.19 2022-08-22 10:59:12 -07:00