terraform state show command displays the attributes of a single resource in the Terraform state.
Synopsis
Show a resource in the state.Usage
terraform state list.
Options
Path to a Terraform state file to use to look up Terraform-managed resources. By default it will use the state “terraform.tfstate” if it exists.
Arguments
The address of the resource instance to show. Must be a complete resource instance address.
Examples
Show a single resource instance
Display the attributes of a specific resource:Show a resource with count
Display a specific instance from a resource with count:Show a module resource
Display a resource within a module:Use custom state file
Show a resource from a specific state file:Common Use Cases
Inspect resource attributes
Usestate show to inspect the current attributes of a resource, including computed values that were set during the last apply.
Verify resource configuration
Compare the actual state values with your expected configuration to identify drift or verify that changes were applied correctly.Debug issues
When troubleshooting issues, usestate show to examine the exact state of resources as Terraform sees them.