terraform/internal/command/workdir
Sarah French 3db7c751a8
PSS: Fix use of reattached providers in init, enable use of reattached providers during plan-apply workflow (#38182)
* refactor: Check that the state storage provider is present when beginning to initialise a state store for use in a non-init command. Ensure reattached providers can be used.

Previously we passed all required providers into backend options to be used within `stateStoreConfig`, which is invoked via (Meta).Backend. The new approach enforces that the provider is present while assembling the backend options passed to (Meta).Backend from (Meta).backend, which is non-init specific. As this code is defending against users running non-init commands before an init, this place feels appropriate and isn't able to impact the init command.

* fix: Reattached PSS providers should return early when checking locks, and an empty locks file is only bad if there isn't a reattached PSS provider

* test: Assert that running init with reattached PSS provider is ok, via an E2E test that uses the reattach feature.

* fix: Allow builtin or reattached providers to be used for state stores when generating a plan file

* test: Expand E2E test to show using a reattached provider can be used for a workflow of init, plan with -out, and apply.

* chore: Replace 'io/ioutil' and format code in unmanaged e2e tests
2026-02-18 11:53:15 +00:00
..
backend_config_state.go make copyrightfix 2026-02-17 13:56:34 +00:00
backend_config_state_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
backend_state.go make copyrightfix 2026-02-17 13:56:34 +00:00
backend_state_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
config_state.go make copyrightfix 2026-02-17 13:56:34 +00:00
dir.go make copyrightfix 2026-02-17 13:56:34 +00:00
doc.go make copyrightfix 2026-02-17 13:56:34 +00:00
normalize_path.go make copyrightfix 2026-02-17 13:56:34 +00:00
plugin_dirs.go make copyrightfix 2026-02-17 13:56:34 +00:00
plugin_dirs_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
statestore_config_state.go PSS: Fix use of reattached providers in init, enable use of reattached providers during plan-apply workflow (#38182) 2026-02-18 11:53:15 +00:00
statestore_config_state_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
testing.go make copyrightfix 2026-02-17 13:56:34 +00:00