Hi,
I see that there’re multiple options for Backends, however git isn’t one of them.
I believe git can be used as a backend for tfstate files in either of the below two methods:
Method 1 (git LFS):
- Create a dedicated git repo
- Commit the tfstate files in a specified directory and branch. Only fetch the required files, rather than the whole repo, as this repo could be used to store multiple tfstate files on different directories.
- For locking and unlocking, use ‘git lfs lock’ (https://github.com/git-lfs/git-lfs/wiki/File-Locking)
Method 2 (git - where lfs isn’t possible):
- Create a dedicated git repo
- Commit the tfstate files in a specified directory and branch. Only fetch the required files, rather than the whole repo, as this repo could be used to store multiple tfstate files on different directories.
- For locking and unlocking, use another file suffixed with .lock, which should contain the lock state.
Would terraform be adding this feature?
Thanks,