terraform/backend/remote-state/consul
Rémi Lapeyre 11eb88753d Fix `terraform force-unlock <lock_id>` for Consul backend
When locking was enabled with the Consul backend and the lock not properly
released, the `terraform force-unlock <lock_id>` command would do nothing as
its implementation would exit early in that case.

It now destroys the session that created the lock and clean both the lock and
the lock-info keys.

A regression test is added to TestConsul_destroyLock() to catch the issue if it
happends again.

Closes https://github.com/hashicorp/terraform/issues/22174
2020-08-13 15:20:24 +02:00
..
backend.go add broken test for lock lost on connection error 2017-10-08 16:16:57 -04:00
backend_state.go state: remove deprecated state package (#25490) 2020-08-11 11:43:01 -04:00
backend_test.go Fix `terraform force-unlock <lock_id>` for Consul backend 2020-08-13 15:20:24 +02:00
client.go Fix `terraform force-unlock <lock_id>` for Consul backend 2020-08-13 15:20:24 +02:00
client_test.go Fix `terraform force-unlock <lock_id>` for Consul backend 2020-08-13 15:20:24 +02:00