Back to Glossary
IaC

What is Terraform State?

Terraform's record of the real-world resources it manages, stored as JSON.

Terraform State is a JSON file that maps Terraform resource definitions to real-world infrastructure objects. Terraform uses state to determine what changes need to be made during a plan/apply. For teams, state must be stored in a shared remote backend (S3 + DynamoDB for locking) to prevent conflicts. State can contain sensitive data (passwords, private keys) — encrypt it at rest. Never manually edit state; use 'terraform state' commands or 'terraform import'.

Deep Dive Guide

terraform remote state s3 dynamodb

Test your knowledge of Terraform State and 130 other DevOps concepts