2020-10-27 02:15:36 +01:00
|
|
|
---
|
|
|
|
layout: "docs"
|
|
|
|
page_title: "Inspecting Infrastructure - Terraform CLI"
|
2021-07-30 20:22:16 +02:00
|
|
|
description: "Learn commands to inspect dependency information, outputs, etc. Use them for integration or to understand your infrastructure."
|
2020-10-27 02:15:36 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
2021-01-19 22:43:01 +01:00
|
|
|
- [The `terraform graph` command](/docs/cli/commands/graph.html) creates a visual
|
2020-10-27 02:15:36 +01:00
|
|
|
representation of a configuration or a set of planned changes.
|
2021-01-19 22:43:01 +01:00
|
|
|
- [The `terraform output` command](/docs/cli/commands/output.html) can get the
|
2021-01-15 23:13:53 +01:00
|
|
|
values for the top-level [output values](/docs/language/values/outputs.html) of
|
2020-10-27 02:15:36 +01:00
|
|
|
a configuration, which are often helpful when making use of the infrastructure
|
|
|
|
Terraform has provisioned.
|
2021-01-19 22:43:01 +01:00
|
|
|
- [The `terraform show` command](/docs/cli/commands/show.html) can generate
|
2020-10-27 02:15:36 +01:00
|
|
|
human-readable versions of a state file or plan file, or generate
|
|
|
|
machine-readable versions that can be integrated with other tools.
|
2021-01-19 22:43:01 +01:00
|
|
|
- [The `terraform state list` command](/docs/cli/commands/state/list.html) can list
|
2020-10-27 02:15:36 +01:00
|
|
|
the resources being managed by the current working directory and workspace,
|
|
|
|
providing a complete or filtered list.
|
2021-01-19 22:43:01 +01:00
|
|
|
- [The `terraform state show` command](/docs/cli/commands/state/show.html) can print
|
2020-10-27 02:15:36 +01:00
|
|
|
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.
|