I’m guessing you’ve started working with Terraform and you’re staring at that weird looking state file Terraform just outputted wondering if it’s safe to commit the file to Git (or some other source control)?
A key to understanding Terraform is understanding how to manage your state. Today we’re going to discuss the in’s and out’s of the state file, and answer the pressing question: Should you commit the Terraform .tfstate file to Git?
By the end of this article you’ll understand what a TF state file is, why Terraform needs it, how you can manage it, and ultimately whether you should commit it to git (or not!)