opentofu/backend
Rémi Lapeyre 032d339915 Sanitize lock path for the Consul backend when it ends with a /
When the path ends with / (e.g. `path = "tfstate/"), the lock
path used will contain two consecutive slashes (e.g. `tfstate//.lock`) which
Consul does not accept.

This change the lock path so it is sanitized to `tfstate/.lock`.

If the user has two different Terraform project, one with `path = "tfstate"` and
the other with `path = "tfstate/"`, the paths for the locks will be the same
which will be confusing as locking one project will lock both. I wish it were
possible to forbid ending slashes altogether but doing so would require all
users currently having an ending slash in the path to manually move their
Terraform state and would be a poor user experience.

Closes https://github.com/hashicorp/terraform/issues/15747
2020-08-13 16:29:43 +02:00
..
atlas state: remove deprecated state package (#25490) 2020-08-11 11:43:01 -04:00
init Add kubernetes backend 2020-06-04 02:29:57 -04:00
local Merge pull request #25779 from hashicorp/jbardin/remove-state-attrs 2020-08-12 10:49:44 -04:00
remote state: remove deprecated state package (#25490) 2020-08-11 11:43:01 -04:00
remote-state Sanitize lock path for the Consul backend when it ends with a / 2020-08-13 16:29:43 +02:00
backend.go state: remove deprecated state package (#25490) 2020-08-11 11:43:01 -04:00
cli.go backend: Update interface and implementations for new config loader 2018-10-16 18:39:12 -07:00
nil_test.go backend: introduce the backend set of interfaces 2017-01-26 14:33:49 -08:00
nil.go Change backend.ValidateConfig to PrepareConfig 2019-02-25 18:37:20 -05:00
operation_type.go Version tools per Go convention under tools.go 2019-10-17 22:23:39 +02:00
operationtype_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
testing.go state: remove deprecated state package (#25490) 2020-08-11 11:43:01 -04:00
unparsed_value_test.go backend/local: Handle interactive prompts for variables in UI layer 2019-10-10 10:07:01 -07:00
unparsed_value.go Avoid leaking sensitive values in undeclared warnings 2019-11-05 17:32:57 -08:00