Terraform local state file and Amazon S3 backend locking interoperability
0 reputation · 30 Mar 2020, 16:25 UTC
0 reputation · 30 Mar 2020, 16:25 UTC
35775 reputation · 31 Mar 2020, 02:26 UTC
Terraform does not verify that the existing lock‑table configuration matches the one used by the local state before it copies the file into the S3 backend. During terraform init -migrate-state the local terraform.tfstate is uploaded to the bucket and the backend’s DynamoDB lock table is created (or reused) if it does not already exist. From that point forward all operations use the remote lock mechanism; the local file‑system lock is no longer consulted.
Are any other workstations or CI agents still referencing the original local terraform.tfstate after the migration?
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.