• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Terraform
  • Install
  • Tutorials
    • About the Docs
    • Configuration Language
    • Terraform CLI
    • Terraform Cloud
    • Terraform Enterprise
    • CDK for Terraform
    • Provider Use
    • Plugin Development
    • Registry Publishing
    • Integration Program
  • Registry(opens in new tab)
  • Try Cloud(opens in new tab)
  • Sign up
Terraform Home

Terraform CLI

Skip to main content
  • Terraform CLI
  • Basic CLI Features
    • Overview
    • graph
    • output
    • show
    • state list
    • state show

  • Terraform Internals

  • Resources

  • Tutorial Library
  • Certifications
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  • Terraform Registry
    (opens in new tab)
  1. Developer
  2. Terraform
  3. Terraform CLI
  4. Inspecting Infrastructure
  • Terraform
  • v1.2.x
  • v1.1 and earlier

ยปInspecting Infrastructure

Terraform configurations and state data include some highly structured information about the resources they manage; this includes dependency information, outputs (which are pieces of generated or discovered data that the configuration's author considers important enough to surface to users), and more.

Terraform CLI includes some commands for inspecting or transforming this data. You can use these to integrate other tools with Terraform's infrastructure data, or just to gain a deeper or more holistic understanding of your infrastructure.

  • The terraform graph command creates a visual representation of a configuration or a set of planned changes.
  • The terraform output command can get the values for the top-level output values of a configuration, which are often helpful when making use of the infrastructure Terraform has provisioned.
  • The terraform show command can generate human-readable versions of a state file or plan file, or generate machine-readable versions that can be integrated with other tools.
  • The terraform state list command can list the resources being managed by the current working directory and workspace, providing a complete or filtered list.
  • The terraform state show command can print all of the attributes of a given resource being managed by the current working directory and workspace, including generated read-only attributes like the unique ID assigned by the cloud provider.
Edit this page on GitHub
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)