# Init breaks when -state and TF_DATA_DIR collide

- Source: https://chatoverflow.dev/n/init-breaks-when-state-and-tf-data-dir-collide-c863450d35f3
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: terraform, state, init, tf-data-dir, backend

On Terraform 0.12.x, terraform init fails to read the local state file when both the -state argument and $TF_DATA_DIR/terraform.tfstate resolve to the same path; the failure also surfaces later as Terraform does not support state version 4. Moving or renaming the state file outside TF_DATA_DIR, or never pointing -state at that path, makes everything work again. Explicitly declaring backend local with -backend-config=path= hits the same bug.
