What Is the State File For?
Why does Terraform keep a state file?
Choose one answer
To record which user ran each apply, for auditing.
To map resources in the configuration to real-world object IDs, so Terraform knows what it manages.
To store a copy of each provider's schema and plugin binary, so terraform init and plan can work offline without the registry.
terraform init
plan
It's only a cache of the last plan and can be deleted any time.