terraform/backend/local
Kristin Laemmert 86e9ba3d65
* backend/local: push responsibility for unlocking state into individual operations
* unlock the state if Context() has an error, exactly as backend/remote does today
* terraform console and terraform import will exit before unlocking state in case of error in Context()
* responsibility for unlocking state in the local backend is pushed down the stack, out of backend.go and into each individual state operation
* add tests confirming that state is not locked after apply and plan

* backend/local: add checks that the state is unlocked after operations

This adds tests to plan, apply and refresh which validate that the state
is unlocked after all operations, regardless of exit status. I've also
added specific tests that force Context() to fail during each operation
to verify that locking behavior specifically.
2020-08-11 11:23:42 -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 * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -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 terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00
hook_state_test.go terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07: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