terraform/internal/backend/local
Alisdair McDiarmid a3b1764fd7 backend/local: Fix lock when applying stale plan
When returning from the context method, a deferred function call checked
for error diagnostics in the `diags` variable, and unlocked the state if
any exist. This means that we need to be extra careful to mutate that
variable when returning errors, rather than returning a different set of
diags in the same position.

Previously this would result in an invalid plan file causing a lock to
become stuck.
2021-05-26 16:05:58 -04:00
..
testdata
backend.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
backend_apply.go save apply diagnostics on backend failure 2021-05-17 17:22:04 -04:00
backend_apply_test.go save apply diagnostics on backend failure 2021-05-17 17:22:04 -04:00
backend_local.go backend/local: Fix lock when applying stale plan 2021-05-26 16:05:58 -04:00
backend_local_test.go backend/local: Fix lock when applying stale plan 2021-05-26 16:05:58 -04:00
backend_plan.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
backend_plan_test.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
backend_refresh.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
backend_refresh_test.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
backend_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
cli.go
hook_state.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
hook_state_test.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
local_test.go
testing.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00