Question 1 · choose 1
An engineer needs the exact address of every resource Terraform manages in a configuration, including those inside modules, to use in a -replace option. Which command lists them?
- Aterraform providers
- Bterraform graph
- Cterraform state list
- Dterraform output
Show the answer and why
Aterraform providers
Incorrect
That shows provider requirements.
Bterraform graph
Incorrect
graph prints the dependency graph in DOT format, not a list of state addresses.
Cterraform state list
Correct
state list lists all resources in the state, including resources in modules, optionally filtered by address.
Dterraform output
Incorrect
output prints output values.
state list is the quickest way to get addresses for other commands.
HashiCorp documentation