What does the state file contain?
BeginnerConceptState Internals
Answer
For every managed resource: its address, provider, the real resource ID, all attribute values (including computed ones and secrets) and dependencies. It also records outputs, the Terraform version and a serial and lineage for consistency. Treat it as sensitive data, not just metadata.
More on State Internals
What 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?AdvancedHow do you inspect resources in state?BeginnerWhen do you use `terraform state mv`?Intermediate