What is a state in terraform?

The state maintained by Terraform is a JSON document stored locally or on a remote backend. Making direct edits to the file is highly discouraged. There are some occasions where we need to directly interact with the Terraform state, and in those cases, we use the terraform state command and its subcommands to assist us.

Get hands-on with 1200+ tech skills courses.