Looking behind the locking in terraform

Have you ever wondered what it actually means when Terraform says it&rsquo;s &ldquo;acquiring a state lock&rdquo;? Terraform uses the state locking feature to prevent two people from modifying the same state file at the same time. But how does it actually do that? In this post we&rsquo;ll dig into how locking works, especially when we use the GCS backend, where state locking is a first-class…