...
/Listing Resources within Terraform State
Listing Resources within Terraform State
Learn how to list resources within a Terraform state.
We'll cover the following...
We'll cover the following...
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.
The terraform state subcommands
Below is a list of terraform state subcommands available for use.
- The
listsubcommand lists resources in the state. - The
mvsubcommand moves an item in the state. - The
pullsubcommand pulls the current state and output tostdout. - The
pushsubcommand updates the