terraform/backend/local
Kristin Laemmert 196c183dda
terraform: remove state from `validate` graph walk (#26063)
This pull reverts a recent change to backend/local which created two context, one with and one without state. Instead I have removed the state entirely from the validate graph (by explicitly passing a states.NewState() to the validate graph builder).

This changed caused a test failure, which (ty so much for the help) @jbardin discovered was inaccurate all along: the test's call to `Validate()` was actually what was removing the output from state. The new expected test output matches terraform's actual behavior on the command line: if you use -target to destroy a resource, an output that references only that resource is *not* removed from state even though that test would lead you to believe it did.

This includes two tests to cover the expected behavior:

TestPlan_varsUnset has been updated so it will panic if it gets more than one request to input a variable
TestPlan_providerArgumentUnset covers #26035

Fixes #26035, #26027
2020-08-31 15:45:39 -04:00
..
testdata backend/local: treat output changes as side-effects to be applied 2020-05-29 07:36:40 -07:00
backend.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_apply.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_apply_test.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_local.go terraform: remove state from `validate` graph walk (#26063) 2020-08-31 15:45:39 -04:00
backend_local_test.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_plan.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_plan_test.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_refresh.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_refresh_test.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_test.go Implement the remote enhanced backend 2018-11-06 16:29:46 +01:00
cli.go command: Fix TestMetaBackend_configuredChangeCopy_multiToMulti 2018-11-19 09:02:35 -08:00
counthookaction_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
hook_count.go backend/local: Fix incorrect destroy/update count on apply 2018-12-11 18:06:53 +00:00
hook_count_action.go Version tools per Go convention under tools.go 2019-10-17 22:23:39 +02:00
hook_count_test.go backend/local: Fix incorrect destroy/update count on apply 2018-12-11 18:06:53 +00:00
hook_state.go state: remove deprecated state package (#25490) 2020-08-11 11:43:01 -04:00
hook_state_test.go state: remove deprecated state package (#25490) 2020-08-11 11:43:01 -04:00
local_test.go backend/local 2017-01-26 14:33:49 -08:00
testing.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00