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

HashiCorp Terraform Associate (003) Exam Guide
By :

The following section will cover the subcommands of the terraform state
command; each has its own use case that will be discussed in detail.
The terraform state list
command will list all the resources within the state file.
This is how the command is used:
$ terraform state list <list_options> <RESOURCE_ADDRESS>
If RESOURCE_ADDRESS
is not specified, the command will list all resources available in the state file. When specified, the command will list only the resources matching the criteria.
There could be situations where you might be dealing with a large number of resources and listing everything in one go may not be required. In that case, you can choose to list only specific resources, all resources belonging to a specific module, all instances created by the same resource group, and so on.
The options supported by this command are as follows:
-state=<PATH>
: This option...