Interview Prep/Terraform/State Internals

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.

All Terraform questions Roadmap: Terraform in production

More on State Internals