simplify the backend interface; promote locking to a first class citizen #26572
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there,
Looking at promoting locking to a first class function for terraform backends. See #26422
Starting a draft here to allow a fail-fast, in case this is a non-starter or undesirable (this would result in a large refactor, and changes to each backend implementation).
Anyways, I'm thinking that backends should support simple operations, and place the complexity of calling, locking, and coordinating various operations in the main terraform code. The result is backends will only need to implement the following:
I understand there are some implementations (consul, any others?) that require a live session for locking, however it is feasible to implement locking without that. For now I'd like to stray away from how we will achieve this, and those specific implementation details, but whether this is desirable for the calling code within terraform, or if there are any other non-starters.