opentofu/internal/command
Martin Atkins 55855fca70 getproviders: Unify package authentication with hash lock selection
As discussed in opentofu/opentofu#2656, this consolidates the two concerns
of the PackageAuthentication interface into a single function that deals
both with package authentication _and_ with reporting all of the package
hashes that were used to make the authentication decision.

This means that any .zip archive that OpenTofu directly verifies during
installation can now have its hash recorded in the dependency lock file
even if that package didn't come from the provider's origin registry, which
is beneficial when the first installation of a provider comes from a
secondary ("mirror") source because it creates an additional hook by which
that dependency lock file entry can be "upgraded" to be complete in a
future "tofu init" run against the origin registry, or by the
"tofu providers lock" command.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-04-14 08:31:40 -07:00
..
arguments Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
cliconfig cliconfig+main: Allow oci_mirror as a new provider installation method 2025-03-26 09:52:07 -07:00
clistate Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
e2etest e2etest: Verify support for provider installation from oci_mirror 2025-03-26 09:52:07 -07:00
format Warning and Error consolidation CLI options (#1894) 2024-09-23 07:31:06 -04:00
jsonchecks Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
jsonconfig Detect when provider and resource/module have identical for_each (#2186) 2024-12-03 14:02:27 -05:00
jsonformat Fix: Ensure constant format strings in fmt and printf calls 2025-02-26 11:33:43 -08:00
jsonfunction Integrate provider functions (#1439) 2024-04-10 08:04:08 -04:00
jsonplan Fix quadratic marshalPlannedValues (#2324) 2025-01-06 16:20:41 -05:00
jsonprovider Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
jsonstate Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
testdata Adds support for run block outputs in the test provider block (#2543) 2025-03-18 12:29:37 +04:00
testing Adds support for run block outputs in the test provider block (#2543) 2025-03-18 12:29:37 +04:00
views Implement the first part of RFC 20250303-linter-policy (#2577) 2025-03-10 13:16:27 -04:00
webbrowser Fix typos (#1905) 2024-08-29 13:20:33 -04:00
workdir Fix typos (#1905) 2024-08-29 13:20:33 -04:00
alias.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
apply.go Typo: consolodation -> consolidation (#2587) 2025-03-12 11:47:47 -04:00
apply_destroy_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
apply_test.go feat: remove progress messages from commands using -concise argument (#2549) 2025-03-04 11:30:31 -03:00
autocomplete.go Remove encryption diags from autocomplete (#1793) 2024-07-10 10:07:11 -04:00
autocomplete_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
cli_ui.go Fix struct names (#1494) 2024-04-25 08:15:46 +02:00
cli_ui_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
command.go Better var file type detection (#1881) 2024-08-02 07:29:40 -04:00
command_test.go fix: remove elapsed_seconds check on the golden reference (#2565) 2025-03-06 09:03:46 -03:00
console.go Typo: consolodation -> consolidation (#2587) 2025-03-12 11:47:47 -04:00
console_interactive.go Fix exit command in console interactive mode (#2086) 2024-10-29 12:13:44 +02:00
console_interactive_test.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
console_state.go Implement the first part of RFC 20250303-linter-policy (#2577) 2025-03-10 13:16:27 -04:00
console_state_test.go Adds multi line support to console (#1875) 2024-08-02 10:21:44 +01:00
console_test.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
flag_kv.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
flag_kv_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
fmt.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
fmt_test.go Include .tofu in tofu fmt (#1790) 2024-07-10 09:06:08 -04:00
get.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
get_test.go Add test cases for GetCommand to cover invalid args scenarios (#1940) 2024-09-27 10:22:47 -04:00
graph.go Temporarily disable the complexity-related lint rules 2025-01-03 10:41:05 -05:00
graph_test.go Fix tofu validate with static variables (#1788) 2024-07-11 10:16:20 -04:00
helper.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
hook_module_install.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
import.go Typo: consolodation -> consolidation (#2587) 2025-03-12 11:47:47 -04:00
import_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
init.go getproviders: Unify package authentication with hash lock selection 2025-04-14 08:31:40 -07:00
init_test.go getproviders: Unify package authentication with hash lock selection 2025-04-14 08:31:40 -07:00
login.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
login_test.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
logout.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
logout_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
meta.go Typo: consolodation -> consolidation (#2587) 2025-03-12 11:47:47 -04:00
meta_backend.go Fix: Ensure constant format strings in fmt and printf calls 2025-02-26 11:33:43 -08:00
meta_backend_migrate.go Fix: Ensure constant format strings in fmt and printf calls 2025-02-26 11:33:43 -08:00
meta_backend_migrate_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
meta_backend_test.go Fix regression of backend reinit detection when backend schema has required arguments (#2119) 2024-11-04 14:23:32 -05:00
meta_config.go Adds prompt for missing static variables (#2047) 2024-10-07 18:30:42 +01:00
meta_dependencies.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
meta_encryption.go Fix plan static variable injection (#1771) 2024-07-09 07:17:45 -04:00
meta_new.go Initial wiring of encryption through the command package (#1316) 2024-03-07 08:55:57 -05:00
meta_providers.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
meta_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
meta_ui.go add automated copyright header check (#1696) 2024-06-03 16:49:36 +03:00
meta_vars.go Adds prompt for missing static variables (#2047) 2024-10-07 18:30:42 +01:00
meta_vars_test.go Better var file type detection (#1881) 2024-08-02 07:29:40 -04:00
metadata_command.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
metadata_functions.go Integrate provider functions (#1439) 2024-04-10 08:04:08 -04:00
metadata_functions_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
output.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
output_test.go Add -show-sensitive flag to tofu plan, apply, state-show and output commands (#1554) 2024-07-22 10:58:57 +01:00
plan.go Typo: consolodation -> consolidation (#2587) 2025-03-12 11:47:47 -04:00
plan_test.go feat: remove progress messages from commands using -concise argument (#2549) 2025-03-04 11:30:31 -03:00
plugins.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
plugins_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
providers.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
providers_lock.go getproviders: Unify package authentication with hash lock selection 2025-04-14 08:31:40 -07:00
providers_lock_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
providers_mirror.go Add a new warning when a provider cannot be downloaded and it was requested by an implicit usage (#2479) 2025-02-12 18:40:54 +02:00
providers_mirror_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
providers_schema.go tofu: Context.Validate now takes a context.Context 2024-11-19 10:15:21 -08:00
providers_schema_test.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
providers_test.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
push.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
refresh.go Typo: consolodation -> consolidation (#2587) 2025-03-12 11:47:47 -04:00
refresh_test.go Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
show.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
show_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
state_command.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
state_list.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
state_list_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
state_meta.go Error handling fixes (#1816) 2024-07-15 11:58:43 +02:00
state_mv.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
state_mv_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
state_pull.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
state_pull_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
state_push.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
state_push_test.go Integrate Encryption into State Backends (#1288) 2024-03-04 09:25:14 -05:00
state_replace_provider.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
state_replace_provider_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
state_rm.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
state_rm_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
state_show.go tofu: Context.Validate now takes a context.Context 2024-11-19 10:15:21 -08:00
state_show_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
state_test.go Initial wiring of encryption through the command package (#1316) 2024-03-07 08:55:57 -05:00
taint.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
taint_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
telemetry.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
test.go Adds support for run block outputs in the test provider block (#2543) 2025-03-18 12:29:37 +04:00
test_test.go Adds support for run block outputs in the test provider block (#2543) 2025-03-18 12:29:37 +04:00
ui_input.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
ui_input_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
unlock.go bug: add error handling for missing state lock config in S3, HTTP and OSS backends (#1977) 2024-09-20 18:29:36 +02:00
unlock_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
untaint.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
untaint_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
validate.go Typo: consolodation -> consolidation (#2587) 2025-03-12 11:47:47 -04:00
validate_test.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
version.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
version_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
workspace_command.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
workspace_command_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
workspace_delete.go Add missing [options] to help text where applicable (#1855) 2024-07-24 09:27:07 -04:00
workspace_list.go Add missing [options] to help text where applicable (#1855) 2024-07-24 09:27:07 -04:00
workspace_new.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
workspace_select.go Add missing [options] to help text where applicable (#1855) 2024-07-24 09:27:07 -04:00
workspace_show.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00