Rationale for Correct Answer: terraform graph outputs a Graphviz DOT representation of Terraform’s dependency graph, which you can pipe into Graphviz tools (e.g., dot) to visualize resource/module dependencies.
Analysis of Incorrect Options (Distractors):
B: terraform show displays state or a plan file in human-readable form (or JSON with -json), not DOT.
C: terraform refresh (deprecated as a standalone command in newer workflows) refreshes state, not graph output.
D: terraform output prints root module outputs, not dependency graphs.
Key Concept: Visualizing Terraform’s dependency graph using terraform graph.
[Reference: Terraform Objectives — Understand Terraform Basics and CLI (CLI commands and troubleshooting/visualization)., , ]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit