After upgrading to Terraform 1.11 you see `Warning: Deprecated Parameter` for `dynamodb_table`. On an older laptop `use_lockfile` gives `An argument named "use_lockfile" is not expected here`.
IntermediateTroubleshootingState Locking and Backend Errors
Answer
Likely causes → DynamoDB locking is deprecated in favour of S3-native locking. use_lockfile was added in 1.10, so older binaries reject it.
Diagnose → terraform version on each machine and CI image; check required_version.
Fix → Standardize on 1.10+ everywhere, then migrate in two steps: set both use_lockfile = true and dynamodb_table (both locks are taken), roll out, then remove dynamodb_table.
Prevent → Pin required_version = ">= 1.10, < 2.0" and the CI image version, and use tfenv/mise with a .terraform-version file.
More on State Locking and Backend Errors
`terraform plan` fails with `Error acquiring the state lock` and `ConditionalCheckFailedException: The conditional request failed`.BeginnerWith the S3 backend and `use_lockfile = true`, you get `Error acquiring the state lock` with `StatusCode: 412` and `PreconditionFailed`.Intermediate`terraform force-unlock` returns `Failed to unlock state: lock ID "..." does not match existing lock`.BeginnerA teammate ran `terraform apply -lock=false` "because the lock was stuck". Now the plan shows resources you never touched being recreated.Advanced`terraform init` fails with `Error: Backend configuration changed`.Beginner`terraform init -migrate-state` asks `Do you want to copy existing state to the new backend?` and the new backend already has a state. What is the danger?Intermediate