DevOpsInterviewPrep logo
🏗️ Declarative Infrastructure
Core

State and drift: why infrastructure as code needs a ledger

Terraform state is not a cache and not an optimisation. It is the mapping between the names in your configuration and the identifiers in the provider, and without it there is no way to know whether a resource in your code is the same resource that exists in the cloud. Every confusing Terraform behaviour, from destroy and recreate to import, follows from what state is for.

a free account opens the core tier · no card
RELATED CONCEPTS
PRACTICE THIS IN REAL QUESTIONS