opentofu/internal/command
Christian Mesh 50d94e089f
Some checks are pending
build / Build for freebsd_386 (push) Waiting to run
build / Build for linux_386 (push) Waiting to run
build / Build for openbsd_386 (push) Waiting to run
build / Build for windows_386 (push) Waiting to run
build / Build for freebsd_amd64 (push) Waiting to run
build / Build for linux_amd64 (push) Waiting to run
build / Build for openbsd_amd64 (push) Waiting to run
build / Build for solaris_amd64 (push) Waiting to run
build / Build for windows_amd64 (push) Waiting to run
build / Build for freebsd_arm (push) Waiting to run
build / Build for linux_arm (push) Waiting to run
build / Build for linux_arm64 (push) Waiting to run
build / Build for darwin_amd64 (push) Waiting to run
build / Build for darwin_arm64 (push) Waiting to run
build / End-to-end Tests for linux_386 (push) Waiting to run
build / End-to-end Tests for windows_386 (push) Waiting to run
build / End-to-end Tests for darwin_amd64 (push) Waiting to run
build / End-to-end Tests for linux_amd64 (push) Waiting to run
build / End-to-end Tests for windows_amd64 (push) Waiting to run
Quick Checks / List files changed for pull request (push) Waiting to run
Quick Checks / Unit tests for linux_386 (push) Blocked by required conditions
Quick Checks / Unit tests for linux_amd64 (push) Blocked by required conditions
Quick Checks / Unit tests for windows_amd64 (push) Blocked by required conditions
Quick Checks / Unit tests for linux_arm (push) Blocked by required conditions
Quick Checks / Unit tests for darwin_arm64 (push) Blocked by required conditions
Quick Checks / Unit tests for linux_arm64 (push) Blocked by required conditions
Quick Checks / Race Tests (push) Blocked by required conditions
Quick Checks / End-to-end Tests (push) Blocked by required conditions
Quick Checks / Code Consistency Checks (push) Blocked by required conditions
Quick Checks / License Checks (push) Waiting to run
Website checks / List files changed for pull request (push) Waiting to run
Website checks / Build (push) Blocked by required conditions
Website checks / Test Installation Instructions (push) Blocked by required conditions
Remove legacy state formats
There are a variety of bugs that were discovered in
https://github.com/opentofu/opentofu/pull/4222 where the tests
did not handle "depend_on" correctly. This was especially broken
in the older state file format migration paths.

Given that we require people to migrate to at least TF1.0 before using
OpenTofu, this removes the legacy fallbacks that now use the standard
"unable to use this version's state file" message.

The only unrelated test was a migration of a v3 local-state file from an
old test.

Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2026-06-04 11:03:31 -04:00
..
arguments Replace backend individual attributes from Meta with arguments.Backend (#4073) 2026-05-19 16:05:47 +03:00
cliconfig lint: reintroduce ST1016 static check 2026-06-01 09:55:03 -05:00
clistate Failed to load backend configuration (#3961) 2026-04-20 11:04:28 +03:00
e2etest e2etest: More elaborate documentation 2026-05-28 07:01:33 -07:00
flags command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
format Deprecation diagnostics internal rework (#3996) 2026-04-28 07:44:49 -04:00
jsonchecks Feature branch: Ephemeral resources (#2852) 2025-08-04 16:39:12 +03:00
jsonconfig Implement resource identity support (#3671) 2026-03-31 16:57:21 +01:00
jsonentities Implement resource identity support (#3671) 2026-03-31 16:57:21 +01:00
jsonformat tofu plan: mention that empty plan might be caused by incorrect -target 2026-04-28 11:40:20 -07:00
jsonplan Deprecation diagnostics internal rework (#3996) 2026-04-28 07:44:49 -04:00
jsonprovider Deprecated resource blocks attrs (#3973) 2026-04-07 10:30:43 -04:00
jsonstate Deprecation diagnostics internal rework (#3996) 2026-04-28 07:44:49 -04:00
system Extract global configurations in one struct (#4072) 2026-05-19 15:32:44 +03:00
testdata Remove legacy state formats 2026-06-04 11:03:31 -04:00
testing Ephemeral todos handling (#3177) 2025-09-10 07:45:23 -04:00
views removed dependency from legacy state files 2026-05-21 13:56:26 -05:00
webbrowser main: Honor the BROWSER environment variable on Unix systems 2025-11-03 11:27:13 -08:00
workdir Failed to load backend configuration (#3961) 2026-04-20 11:04:28 +03:00
alias.go Add new CLI arg to control what warnings should be shown for deprecated outputs/variables (#2705) 2025-05-08 17:01:40 +03:00
apply.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
apply_destroy_test.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
apply_test.go Revert to original pretty-printing for state when applicable 2026-06-04 09:20:45 -04:00
autocomplete.go backend: Backend.Workspaces takes context.Context 2025-05-07 14:14:34 -07:00
autocomplete_test.go Remove Meta not needed functionality (#3958) 2026-03-31 10:15:13 +03:00
command.go Refactor console command to use View instead of Ui (#3764) 2026-03-02 18:58:11 +02:00
command_test.go Revert to original pretty-printing for state when applicable 2026-06-04 09:20:45 -04:00
console.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
console_interactive.go Refactor console command to use View instead of Ui (#3764) 2026-03-02 18:58:11 +02:00
console_interactive_test.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03: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 Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
fmt.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
fmt_test.go Refactor fmt command to use View instead of Ui and to use the arguments package (#3805) 2026-03-05 14:47:37 +02:00
get.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
get_test.go Refactor get command to use View instead of Ui (#3752) 2026-02-24 10:07:28 +02:00
graph.go UIInput must return when the first SIGINT/SIGTERM signal is received (#4051) 2026-04-27 17:03:57 +03:00
graph_test.go Refactor graph command to use View instead of Ui and to use the arguments package (#3802) 2026-03-04 15:21:37 +02: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 Replace backend individual attributes from Meta with arguments.Backend (#4073) 2026-05-19 16:05:47 +03:00
import_test.go Unify patterns across the refactored commands (#3941) 2026-03-26 17:19:27 +02:00
init.go fix: set span error status on module fetch failure path in tofu init 2026-06-01 09:29:43 -04:00
init_test.go fix: skip local encrypted state read when init runs with -backend=false (#4076) (#4077) 2026-05-14 08:52:40 -03:00
login.go Extract global configurations in one struct (#4072) 2026-05-19 15:32:44 +03:00
login_test.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
logout.go Extract global configurations in one struct (#4072) 2026-05-19 15:32:44 +03:00
logout_test.go Refactor logout command to use View instead of Ui (#3761) 2026-02-24 10:05:54 +02:00
meta.go lint: reintroduce ST1016 static check 2026-06-01 09:55:03 -05:00
meta_backend.go Replace backend individual attributes from Meta with arguments.Backend (#4073) 2026-05-19 16:05:47 +03:00
meta_backend_migrate.go Replace backend individual attributes from Meta with arguments.Backend (#4073) 2026-05-19 16:05:47 +03:00
meta_backend_migrate_test.go Remove Meta not needed functionality (#3958) 2026-03-31 10:15:13 +03:00
meta_backend_test.go Replace backend individual attributes from Meta with arguments.Backend (#4073) 2026-05-19 16:05:47 +03:00
meta_config.go Extract global configurations in one struct (#4072) 2026-05-19 15:32:44 +03:00
meta_dependencies.go command: Only shim dependency lock file for installation actions 2025-07-01 07:44:47 -07:00
meta_encryption.go tofu: EvalContext expression evaluation takes context.Context (#2937) 2025-06-19 10:46:31 +01:00
meta_new.go Initial wiring of encryption through the command package (#1316) 2024-03-07 08:55:57 -05:00
meta_providers.go Fix provider schema caching broken in v1.12 2026-05-22 09:48:36 -04:00
meta_test.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
meta_vars.go Remove GatherVariables methods (#3962) 2026-03-31 14:22:31 +03:00
meta_vars_test.go -chdir unification with the workdir logic. Removal of workdir proxy methods from Meta (#3713) 2026-02-10 15:31:06 +02:00
metadata_command.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
metadata_functions.go Refactor version command to use View instead of Ui and to use the arguments package (#3806) 2026-03-05 14:47:29 +02:00
metadata_functions_test.go Refactor version command to use View instead of Ui and to use the arguments package (#3806) 2026-03-05 14:47:29 +02:00
output.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
output_test.go Refactor console command to use View instead of Ui (#3764) 2026-03-02 18:58:11 +02:00
plan.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
plan_test.go Refactor console command to use View instead of Ui (#3764) 2026-03-02 18:58:11 +02:00
plugins.go Extract global configurations in one struct (#4072) 2026-05-19 15:32:44 +03:00
plugins_test.go -chdir unification with the workdir logic. Removal of workdir proxy methods from Meta (#3713) 2026-02-10 15:31:06 +02:00
providers.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
providers_lock.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
providers_lock_test.go Refactor providers lock command to use View instead of Ui and to use the arguments package (#3812) 2026-03-05 09:49:36 +02:00
providers_mirror.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
providers_mirror_test.go Refactor providers mirror command to use View instead of Ui and to use the arguments package (#3813) 2026-03-04 15:20:39 +02:00
providers_schema.go UIInput must return when the first SIGINT/SIGTERM signal is received (#4051) 2026-04-27 17:03:57 +03:00
providers_schema_test.go Unify patterns across the refactored commands (#3941) 2026-03-26 17:19:27 +02:00
providers_test.go Refactor providers command to use View instead of Ui and to use the arguments package (#3811) 2026-03-05 09:49:15 +02:00
push.go Remove show diagnostics (#3950) 2026-03-30 16:00:21 +03:00
refresh.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
refresh_test.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
show.go Remove GatherVariables methods (#3962) 2026-03-31 14:22:31 +03:00
show_test.go Store BeforeIdentity and AfterIdentity and display it in the plan json output (#3779) 2026-04-01 10:46:38 +01:00
state_command.go Unify patterns across the refactored commands (#3941) 2026-03-26 17:19:27 +02:00
state_list.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
state_list_test.go Unify patterns across the refactored commands (#3941) 2026-03-26 17:19:27 +02:00
state_meta.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
state_mv.go Replace backend individual attributes from Meta with arguments.Backend (#4073) 2026-05-19 16:05:47 +03:00
state_mv_test.go Extract global configurations in one struct (#4072) 2026-05-19 15:32:44 +03:00
state_pull.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
state_pull_test.go Refactor state pull command to use View instead of Ui and to use the arguments package (#3837) 2026-03-09 12:25:18 +02:00
state_push.go Replace backend individual attributes from Meta with arguments.Backend (#4073) 2026-05-19 16:05:47 +03:00
state_push_test.go Refactor state push command to use View instead of Ui and to use the arguments package (#3842) 2026-03-09 13:00:30 +02:00
state_replace_provider.go Replace backend individual attributes from Meta with arguments.Backend (#4073) 2026-05-19 16:05:47 +03:00
state_replace_provider_test.go Refactor state replace-provider command to use View instead of Ui and to use the arguments package (#3844) 2026-03-10 17:01:58 +02:00
state_rm.go Replace backend individual attributes from Meta with arguments.Backend (#4073) 2026-05-19 16:05:47 +03:00
state_rm_test.go Refactor state rm command to use View instead of Ui and to use the arguments package (#3849) 2026-03-10 17:54:01 +02:00
state_show.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
state_show_test.go Unify patterns across the refactored commands (#3941) 2026-03-26 17:19:27 +02:00
state_test.go Add backend view and migrate outputs (#3949) 2026-03-30 15:35:09 +03:00
taint.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
taint_test.go Refactor taint && untaint commands to use View instead of Ui and to use the arguments package (#3818) 2026-03-05 09:50:36 +02:00
test.go Remove GatherVariables methods (#3962) 2026-03-31 14:22:31 +03:00
test_test.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
ui_input.go UIInput must return when the first SIGINT/SIGTERM signal is received (#4051) 2026-04-27 17:03:57 +03:00
ui_input_test.go UIInput must return when the first SIGINT/SIGTERM signal is received (#4051) 2026-04-27 17:03:57 +03:00
unlock.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
unlock_test.go removed dependency from legacy state files 2026-05-21 13:56:26 -05:00
untaint.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
untaint_test.go Refactor taint && untaint commands to use View instead of Ui and to use the arguments package (#3818) 2026-03-05 09:50:36 +02:00
validate.go Remove GatherVariables methods (#3962) 2026-03-31 14:22:31 +03:00
validate_test.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
version.go Remove Meta not needed functionality (#3958) 2026-03-31 10:15:13 +03:00
version_test.go Refactor version command to use View instead of Ui and to use the arguments package (#3806) 2026-03-05 14:47:29 +02:00
workspace_command.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
workspace_command_test.go Read state refactor (#3706) 2026-03-19 17:03:16 +02:00
workspace_delete.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
workspace_list.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
workspace_new.go Unify the state related flags in one struct (#4055) 2026-05-19 15:06:36 +03:00
workspace_select.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00
workspace_show.go Remove Ui from the Meta structure (#4000) 2026-04-07 13:38:46 -04:00