How do you inspect resources in state?
BeginnerConceptState Internals
Answer
terraform state list
terraform state show aws_instance.web
terraform state pull | jq '.resources | length'
list filters by address prefix, show prints attributes of one resource, and pull prints the raw JSON state.
More on State Internals
What does the state file contain?BeginnerWhat is the difference between local and remote state?BeginnerHow do you configure the S3 backend?BeginnerWhat is state locking and why does it matter?IntermediateHow does S3-native locking work and how does it replace DynamoDB?AdvancedWhen do you use `terraform state mv`?Intermediate