I am new to Terraform and wanted to ask a couple of questions related to state locking. I was reading “http” backend documentation (https://developer.hashicorp.com/terraform/language/settings/backends/http#unlock_method) and have a couple of questions.
-
First, it is not clear for me what is the purpose of lock_address and unlock_address endpoints ? Do I understand correctly that when request is made to lock_address endpoint the state gets locked and after applying changes to the state there needs to be made the request to unlock_address to unlock the state ?
-
Secondly, there exists lock_method and unlock_method arguments and these methods default to LOCK and UNLOCK . Are these methods the HTTP request methods when making request to lock and unlock addresses ? Why are they not from the traditional HTTP request methods (like GET,PUT,POST,DELETE, etc.) ?
-
If lock_address and unlock_address are intended for sate locking and unlocking so the state stays locked for as long as the unlock_address endpoint is not called ?