-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

HashiCorp Terraform Associate (003) Exam Guide
By :

As you have, the Terraform state file, terraform.tfstate
, is critical to the core workings of a Terraform tool. The individual entries in the Terraform state file map directly to real-world infrastructure. This allows Terraform to sync the resources whenever there are changes to the configuration.
The state file is managed and updated automatically when commands such as plan
and apply
are executed. Sometimes, there might be a need to interact with the state file and make some adjustments to accommodate the changes made outside Terraform. This is where the terraform state
command plays a vital role.
You can start with the terraform state
command and the options associated with it. There are also subcommands within the state
command that help in different scenarios, which will be discussed further in this topic.
As discussed previously, the terraform state
command is used mainly for state management. This...