terraform/backend/remote
Kristin Laemmert 1ba0d615e7
backend/local: release lock if there is an error in Context() (#25427)
* command/console: return in case of errors before trying to unlock remote
state

The remote backend `Context` would exit without an active lock if there
was an error, while the local backend `Context` exited *with* a lock. This
caused a problem in `terraform console`, which would call unlock
regardless of error status.

This commit makes the local and remote backend consistently unlock the
state incase of error, and updates terraform console to check for errors
before trying to unlock the state.

* adding tests for remote and local backends
2020-06-29 14:57:42 -04:00
..
testdata clean up go mod for go-tfe 2019-09-27 14:16:41 -07:00
backend.go prevent panic in remote backend retry 2020-06-22 15:02:23 -04:00
backend_apply.go prevent targeting for unsupported API versions 2020-05-15 16:57:18 -07:00
backend_apply_test.go add sad path tests for the TFP API version check 2020-05-19 11:14:48 -07: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: release lock if there is an error in Context() (#25427) 2020-06-29 14:57: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 add sad path tests for the TFP API version check 2020-05-19 11:14:48 -07: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