Storing the State in a Remote Backend

Learn how to create a storage bucket to hold and save the state of our cluster.

Creating a Google storage bucket

Terraform maintains its internal information about the current state. That allows it to deduce what needs to be done and to converge the actual into the desired state defined in *.tf files. Currently, that state is stored locally in the terraform.tfstate file. For now, there shouldn’t be anything exciting in it. We can see this file in the code playground below by running the cat terraform.tfstate. But for reference, here are the contents of terraform.tfstate.

Get hands-on with 1200+ tech skills courses.