terraform/backend/remote
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 clean up go mod for go-tfe 2019-09-27 14:16:41 -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 prevent targeting for unsupported API versions 2020-05-15 16:57:18 -07:00
backend_apply_test.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_common.go replace status string with go-tfe enum 2020-05-19 11:14:36 -07:00
backend_context.go vendor: go get github.com/hashicorp/go-tfe@v0.8.0 2020-05-15 15:58:01 -07:00
backend_context_test.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_mock.go backend/remote: Handle cost estimation skipped due to targeting 2020-05-18 15:12:44 -07:00
backend_plan.go prevent targeting for unsupported API versions 2020-05-15 16:57:18 -07:00
backend_plan_test.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_state.go Add support for force pushing with the remote backend 2020-05-06 12:07:43 -04:00
backend_state_test.go backend/remote: cleanup test connections 2019-02-07 09:55:19 +01:00
backend_test.go backend/remote: do not panic if PrepareConfig or Configure receive null (#25135) 2020-06-05 09:11:44 -04:00
cli.go Change how to fall back from remote to local backend 2018-11-20 22:25:52 +01:00
colorize.go backend/remote: implement the Local interface 2018-11-26 20:50:25 +01:00
remote_test.go Change how to fall back from remote to local backend 2018-11-20 22:25:52 +01:00
testing.go prevent targeting for unsupported API versions 2020-05-15 16:57:18 -07:00