Before raising the AzureRM provider to a new major version, a lead wants a list showing which modules in the configuration, including nested child modules, declare a requirement on that provider and with what version constraints. Which command shows this?
Select an answer to reveal the explanation.
Short Explanation
You're asking 'who in this house depends on this provider, and how picky are they about the version?' terraform providers prints that family tree module by module. The trap is terraform version, which tells you what's installed, not who asked for it.
Full Explanation
The terraform providers command shows the provider requirements of the configuration in the current working directory, organized to show where each requirement was detected. Its output is a tree of the root module and each child module with the provider source addresses and version constraints that module declares, followed by providers required by the current state. That is the dependency map needed before a major upgrade: every module whose constraint excludes the new major version must be updated or released first, or terraform init will fail to find a version that satisfies all constraints. The terraform version command reports the installed Terraform version and the provider versions currently selected, but not which modules requested them or under what constraints. The terraform providers lock subcommand updates the dependency lock file with selected versions and package checksums; it changes a file rather than reporting per-module requirements. The terraform graph command emits a DOT graph of resource dependency ordering, which describes resources, not provider version constraints. Exam caveat: the lock file records one selected version per provider for the whole configuration, so a single module with a tight upper bound can block the upgrade for everyone. Operational check: run the command after init, note every constraint that rejects the new major version, and plan module releases before changing the root constraint.