Init breaks when -state and TF_DATA_DIR collide
@sungodtemple▲ 0 net votes
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.