A configuration calls module "network", which itself calls a nested subnets module. An engineer needs a quick list of every resource instance in state that belongs to module.network, including the nested module's resources. Which command produces that list?
Select an answer to reveal the explanation.
Short Explanation
You want a roll call, not a biography. terraform state list with a module address names every resource in that module and its submodules. The trap is state show, which wants one single resource and prints its attributes.
Full Explanation
The terraform state list command lists resource instances in state, sorted by module depth and then alphabetically, and accepts one or more address patterns as filters. Giving it a module address such as module.network lists the resources in that module and in any of its submodules, so nested resources such as module.network.module.subnets addresses are included. This is the quickest way to inventory what a module manages before a refactor, an import or an upgrade, and it also accepts an -id option to find the address of an object by its remote ID. The terraform state show command requires an address that points to a single resource instance and prints that resource's attributes, so a module address is not a valid input for it. The terraform output command prints root module output values, and only outputs defined in the root module; it takes an output name rather than a module address and never lists the resources inside a module. The terraform providers command reports provider requirements per module and does not take a module address to list resources. Exam caveat: for_each and count instances appear with their keys or indexes, which must be quoted in most shells when reused as addresses. Operational check: run the command, compare the count with what the module is expected to manage, and use any listed address with terraform state show to inspect details.