terraform/internal/command
Sarah French 7d5baea55e
Some checks are pending
build / Determine intended Terraform version (push) Waiting to run
build / Determine Go toolchain version (push) Waiting to run
build / Generate release metadata (push) Blocked by required conditions
build / Build for freebsd_386 (push) Blocked by required conditions
build / Build for linux_386 (push) Blocked by required conditions
build / Build for openbsd_386 (push) Blocked by required conditions
build / Build for windows_386 (push) Blocked by required conditions
build / Build for darwin_amd64 (push) Blocked by required conditions
build / Build for freebsd_amd64 (push) Blocked by required conditions
build / Build for linux_amd64 (push) Blocked by required conditions
build / Build for openbsd_amd64 (push) Blocked by required conditions
build / Build for solaris_amd64 (push) Blocked by required conditions
build / Build for windows_amd64 (push) Blocked by required conditions
build / Build for freebsd_arm (push) Blocked by required conditions
build / Build for linux_arm (push) Blocked by required conditions
build / Build for darwin_arm64 (push) Blocked by required conditions
build / Build for linux_arm64 (push) Blocked by required conditions
build / Build for windows_arm64 (push) Blocked by required conditions
build / Build for linux_s390x (push) Blocked by required conditions
build / Build Docker image for linux_386 (push) Blocked by required conditions
build / Build Docker image for linux_amd64 (push) Blocked by required conditions
build / Build Docker image for linux_arm (push) Blocked by required conditions
build / Build Docker image for linux_arm64 (push) Blocked by required conditions
build / Build Docker image for linux_s390x (push) Blocked by required conditions
build / Build e2etest for linux_386 (push) Blocked by required conditions
build / Build e2etest for windows_386 (push) Blocked by required conditions
build / Build e2etest for darwin_amd64 (push) Blocked by required conditions
build / Build e2etest for linux_amd64 (push) Blocked by required conditions
build / Build e2etest for windows_amd64 (push) Blocked by required conditions
build / Build e2etest for linux_arm (push) Blocked by required conditions
build / Build e2etest for darwin_arm64 (push) Blocked by required conditions
build / Build e2etest for linux_arm64 (push) Blocked by required conditions
build / Run e2e test for linux_386 (push) Blocked by required conditions
build / Run e2e test for windows_386 (push) Blocked by required conditions
build / Run e2e test for darwin_amd64 (push) Blocked by required conditions
build / Run e2e test for linux_amd64 (push) Blocked by required conditions
build / Run e2e test for windows_amd64 (push) Blocked by required conditions
build / Run e2e test for linux_arm (push) Blocked by required conditions
build / Run e2e test for linux_arm64 (push) Blocked by required conditions
build / Run terraform-exec test for linux amd64 (push) Blocked by required conditions
Quick Checks / Unit Tests (push) Waiting to run
Quick Checks / Race Tests (push) Waiting to run
Quick Checks / End-to-end Tests (push) Waiting to run
Quick Checks / Code Consistency Checks (push) Waiting to run
Quick Checks / Automated defect checks (push) Waiting to run
fix: Simplify how we block upgrading the PSS provider during init -upgrade, now that one download step is specific to the PSS provider. (#38690)
In #38648 the provider download process was changed:

Previously the two steps were:
1. Download providers based on configuration
2. Download providers based on state

The process remains two steps but the new steps are:
1. Download 0-1 provider if one is needed for PSS (1 provider downloaded if PSS is in use)
2. Download all other providers (configuration + state providers)

Because the first download step is specific to the provider used for state storage we can specifically block that provider being upgraded during init. We block upgrade unless the -reconfigure flag is supplied (i.e. the user isn't wanting to migrate state). Users see a warning when they perform an upgrade action and PSS is in use.

Prior to this, users would get an error if the upgrade process impacted the state store provider, now it's never impacts and warnings remind users to upgrade that provider via another command.
2026-06-09 10:39:10 +01:00
..
arguments Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
cliconfig make copyrightfix 2026-02-17 13:56:34 +00:00
clistate make copyrightfix 2026-02-17 13:56:34 +00:00
e2etest test: Make capable E2E tests run in parallel (#38679) 2026-06-05 10:52:21 +01:00
format Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
jsonchecks make copyrightfix 2026-02-17 13:56:34 +00:00
jsonconfig Use configuration values for jsonconfig 2026-03-04 11:45:59 +01:00
jsonformat don't panic on invalid keys for relevant attrs 2026-03-11 14:12:25 -04:00
jsonfunction Merge pull request #38160 from hashicorp/jbardin/inline-type-conversion 2026-02-27 11:11:09 -04:00
jsonplan fix: Filter out forget resources in jsonplan planned_values (#38665) 2026-06-04 15:28:24 +01:00
jsonprovider expose deprecation on provider schema 2026-02-23 15:38:55 +01:00
jsonstate feat(cli): add -json flag for state show (#38341) 2026-04-14 09:33:23 -04:00
junit make copyrightfix 2026-02-17 13:56:34 +00:00
testdata command/init: Only install PSS provider early (#38648) 2026-06-05 17:37:32 +01:00
testing make copyrightfix 2026-02-17 13:56:34 +00:00
views command/init: Only install PSS provider early (#38648) 2026-06-05 17:37:32 +01:00
webbrowser make copyrightfix 2026-02-17 13:56:34 +00:00
workdir PSS: Refactor how we handle unmanaged providers, add support for using dev_override (#38269) 2026-04-14 15:07:56 +01:00
apply.go Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
apply_destroy_test.go test: Enable assertions about prompt text shown to users (#38212) 2026-02-26 14:57:42 +00:00
apply_policy_test.go Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
apply_test.go refactor: Separate concerns in mock provider sources logic, handle callbacks using t.Cleanup (#38446) 2026-04-27 12:13:55 +01:00
autocomplete.go make copyrightfix 2026-02-17 13:56:34 +00:00
autocomplete_test.go refactor: Separate concerns in mock provider sources logic, handle callbacks using t.Cleanup (#38446) 2026-04-27 12:13:55 +01:00
cli_ui.go make copyrightfix 2026-02-17 13:56:34 +00:00
cli_ui_test.go test: Update tests in command package to use t.Parallel (#38688) 2026-06-08 17:37:14 +01:00
cloud.go fix: Block commands from using an invalid workspace name. (#38594) 2026-05-27 14:16:03 +01:00
cloud_mock.go Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
cloud_test.go Mock the cloud backend with a list all vars response 2026-03-30 20:51:48 +02:00
command.go remove copied default value 2026-02-18 12:47:12 +01:00
command_test.go Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
console.go Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
console_interactive.go make copyrightfix 2026-02-17 13:56:34 +00:00
console_interactive_solaris.go make copyrightfix 2026-02-17 13:56:34 +00:00
console_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
experimental_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
flag_kv.go make copyrightfix 2026-02-17 13:56:34 +00:00
flag_kv_test.go test: Update tests in command package to use t.Parallel (#38688) 2026-06-08 17:37:14 +01:00
fmt.go Fix fmt for .tfquery.hcl files 2026-04-17 16:09:06 +02:00
fmt_test.go test: Update tests in command package to use t.Parallel (#38688) 2026-06-08 17:37:14 +01:00
get.go Potentially fetch backend variables for most commands 2026-03-17 16:41:28 +01:00
get_test.go command: test get with const variables 2026-03-30 20:51:48 +02:00
graph.go Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
graph_test.go command: test graph with const variables 2026-03-30 20:51:48 +02:00
helper.go make copyrightfix 2026-02-17 13:56:34 +00:00
hook_module_install.go make copyrightfix 2026-02-17 13:56:34 +00:00
import.go Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
import_test.go refactor: Separate concerns in mock provider sources logic, handle callbacks using t.Cleanup (#38446) 2026-04-27 12:13:55 +01:00
init.go command/init: Only install PSS provider early (#38648) 2026-06-05 17:37:32 +01:00
init2_test.go add provider source back to success tests 2026-04-30 16:07:32 -04:00
init_run.go fix: Simplify how we block upgrading the PSS provider during init -upgrade, now that one download step is specific to the PSS provider. (#38690) 2026-06-09 10:39:10 +01:00
init_test.go fix: Simplify how we block upgrading the PSS provider during init -upgrade, now that one download step is specific to the PSS provider. (#38690) 2026-06-09 10:39:10 +01:00
login.go Fix resource leaks in provisioners and commands (#38585) 2026-05-14 17:36:12 +01:00
login_test.go test: Enable assertions about prompt text shown to users (#38212) 2026-02-26 14:57:42 +00:00
logout.go make copyrightfix 2026-02-17 13:56:34 +00:00
logout_test.go test: Update tests in command package to use t.Parallel (#38688) 2026-06-08 17:37:14 +01:00
meta.go docs: Add code comments to areas where refactoring to use (Meta).WorkingDir.RootModuleDir is not appropriate 2026-06-05 21:45:13 +01:00
meta_backend.go fix: Stop our anti-init -upgrade check panicking when an overridden provider is in use. (#38635) 2026-05-28 10:37:39 +01:00
meta_backend_errors.go PSS: Remove handling of state migrations including PSS from the init command (#38388) 2026-04-16 11:28:05 +01:00
meta_backend_migrate.go make copyrightfix 2026-02-17 13:56:34 +00:00
meta_backend_migrate_test.go test: Enable assertions about prompt text shown to users (#38212) 2026-02-26 14:57:42 +00:00
meta_backend_test.go PSS: Refactor how we handle unmanaged providers, add support for using dev_override (#38269) 2026-04-14 15:07:56 +01:00
meta_config.go fix: Stop our anti-init -upgrade check panicking when an overridden provider is in use. (#38635) 2026-05-28 10:37:39 +01:00
meta_dependencies.go command/init: Only install PSS provider early (#38648) 2026-06-05 17:37:32 +01:00
meta_dependencies_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
meta_new.go make copyrightfix 2026-02-17 13:56:34 +00:00
meta_policy.go Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
meta_providers.go feat: Add warnings to the init command if unmanaged providers will influence provider installation 2026-05-29 13:34:44 +01:00
meta_providers_test.go feat: Add warnings to the init command if unmanaged providers will influence provider installation 2026-05-29 13:34:44 +01:00
meta_test.go fix: Block commands from using an invalid workspace name. (#38594) 2026-05-27 14:16:03 +01:00
metadata_command.go make copyrightfix 2026-02-17 13:56:34 +00:00
metadata_functions.go make copyrightfix 2026-02-17 13:56:34 +00:00
metadata_functions_test.go test: Update tests in command package to use t.Parallel (#38688) 2026-06-08 17:37:14 +01:00
modules.go Potentially fetch backend variables for most commands 2026-03-17 16:41:28 +01:00
modules_test.go command: test modules with const variables 2026-03-30 20:51:48 +02:00
output.go make copyrightfix 2026-02-17 13:56:34 +00:00
output_test.go command/output: Ignore warnings in JSON mode (#38530) 2026-05-06 10:26:40 +01:00
plan.go Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
plan_policy_test.go Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
plan_test.go Add exit code regression test for plan, query and refresh 2026-06-05 15:27:05 +02:00
plugins.go make copyrightfix 2026-02-17 13:56:34 +00:00
plugins_lock.go make copyrightfix 2026-02-17 13:56:34 +00:00
plugins_lock_test.go test: Update tests in command package to use t.Parallel (#38688) 2026-06-08 17:37:14 +01:00
plugins_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
policy.go Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
policy_test.go Add CLI and backend policy wiring for plan apply and query (#38518) 2026-06-05 15:53:11 +02:00
providers.go Potentially fetch backend variables for most commands 2026-03-17 16:41:28 +01:00
providers_lock.go Fix: Remove erroneous warning about dev overrides in the providers lock command (#38655) 2026-05-28 15:08:06 +00:00
providers_lock_test.go command: test providers lock with const variables 2026-03-30 20:51:48 +02:00
providers_mirror.go Fix providers mirrors crash on empty config 2026-03-30 20:51:48 +02:00
providers_mirror_test.go command: test providers mirror with const variables 2026-03-30 20:51:48 +02:00
providers_schema.go refactor: Make providers schema command use the Meta's internal details about the path to the configuration directory. 2026-06-05 21:45:13 +01:00
providers_schema_test.go refactor: Make providers schema command use the Meta's internal details about the path to the configuration directory. 2026-06-05 21:45:13 +01:00
providers_test.go refactor: Separate concerns in mock provider sources logic, handle callbacks using t.Cleanup (#38446) 2026-04-27 12:13:55 +01:00
push.go make copyrightfix 2026-02-17 13:56:34 +00:00
query.go Check for errors after variable collection 2026-06-05 15:27:05 +02:00
query_test.go Add exit code regression test for plan, query and refresh 2026-06-05 15:27:05 +02:00
refresh.go Check for errors after variable collection 2026-06-05 15:27:05 +02:00
refresh_test.go Add exit code regression test for plan, query and refresh 2026-06-05 15:27:05 +02:00
show.go Check variable collection errors during show 2026-06-05 15:27:05 +02:00
show_test.go Check variable collection errors during show 2026-06-05 15:27:05 +02:00
stacks.go make copyrightfix 2026-02-17 13:56:34 +00:00
stacks_test.go test: Update tests in command package to use t.Parallel (#38688) 2026-06-08 17:37:14 +01:00
state_command.go make copyrightfix 2026-02-17 13:56:34 +00:00
state_identities.go make copyrightfix 2026-02-17 13:56:34 +00:00
state_identities_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
state_list.go refactor state-list command argument parsing 2026-02-17 15:55:45 +01:00
state_list_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
state_meta.go make copyrightfix 2026-02-17 13:56:34 +00:00
state_migrate.go Update command help text for state migrate command (#38571) 2026-05-14 13:31:48 +01:00
state_migrate_test.go command: Implement skeleton for state migrate (#38435) 2026-04-27 16:39:02 +01:00
state_mv.go command: Add vars to state mv command 2026-03-17 16:41:28 +01:00
state_mv_test.go command: test state mv with const variables 2026-03-30 20:51:48 +02:00
state_pull.go command: Add vars to state pull command 2026-03-17 16:41:28 +01:00
state_pull_test.go refactor: Separate concerns in mock provider sources logic, handle callbacks using t.Cleanup (#38446) 2026-04-27 12:13:55 +01:00
state_push.go command: Add vars to state push command 2026-03-17 16:41:28 +01:00
state_push_test.go command: test state push with const variables 2026-03-30 20:51:48 +02:00
state_replace_provider.go command: Add vars to state replace command 2026-03-17 16:41:28 +01:00
state_replace_provider_test.go command: test state replace-provider with const variables 2026-03-30 20:51:48 +02:00
state_rm.go command: Add vars to state rm command 2026-03-17 16:41:28 +01:00
state_rm_test.go command: test state rm with const variables 2026-03-30 20:51:48 +02:00
state_show.go refactor: Make state show command use the Meta's internal details about the path to the configuration directory. 2026-06-05 21:45:13 +01:00
state_show_test.go feat(cli): add -json flag for state show (#38341) 2026-04-14 09:33:23 -04:00
state_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
taint.go command: Add vars to taint command 2026-03-17 16:41:28 +01:00
taint_test.go command: test taint with const variables 2026-03-30 20:51:48 +02:00
telemetry.go make copyrightfix 2026-02-17 13:56:34 +00:00
test.go add tests for dynamic module sources in terraform test 2026-03-11 15:29:44 +01:00
test_cleanup.go make copyrightfix 2026-02-17 13:56:34 +00:00
test_test.go Fix flaky ordering test (#38650) 2026-05-27 14:55:48 +02:00
ui_input.go test: Enable assertions about prompt text shown to users (#38212) 2026-02-26 14:57:42 +00:00
ui_input_test.go test: Update tests in command package to use t.Parallel (#38688) 2026-06-08 17:37:14 +01:00
unlock.go make copyrightfix 2026-02-17 13:56:34 +00:00
unlock_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
untaint.go use the arguments package for taint commands 2026-02-17 15:55:36 +01:00
untaint_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
validate.go Limit backend block validation in the validate command to just backend type (#38468) 2026-04-29 18:34:42 +02:00
validate_test.go Limit backend block validation in the validate command to just backend type (#38468) 2026-04-29 18:34:42 +02:00
version.go make copyrightfix 2026-02-17 13:56:34 +00:00
version_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
workspace_command.go refactor: Update workspace select and new subcommands to use the arguments package for parsing arguments and flags (#38430) 2026-05-01 16:39:54 +01:00
workspace_command_test.go test: Update tests in command package to use t.Parallel (#38688) 2026-06-08 17:37:14 +01:00
workspace_delete.go refactor: Update workspace select and delete subcommands to use the arguments package for parsing arguments and flags (#38429) 2026-04-29 08:05:49 -04:00
workspace_list.go fix: Block commands from using an invalid workspace name. (#38594) 2026-05-27 14:16:03 +01:00
workspace_new.go fix: Block commands from using an invalid workspace name. (#38594) 2026-05-27 14:16:03 +01:00
workspace_select.go fix: Block commands from using an invalid workspace name. (#38594) 2026-05-27 14:16:03 +01:00
workspace_show.go refactor: Update workspace select and delete subcommands to use the arguments package for parsing arguments and flags (#38429) 2026-04-29 08:05:49 -04:00