Terraform Error: Inconsistent dependency lock file (.terraform.lock.hcl)
Lock file lacks checksum hashes for the current CI OS/architecture (e.g. `linux_arm64`).
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: Terraform Error
Platform: DevOps
Common Root Causes:
- Lock file lacks checksum hashes for the current CI OS/architecture (e.g. `linux_arm64`).
Interactive Diagnostic Checklist
Verified Solutions:
- Run `terraform providers lock -platform=linux_amd64 -platform=linux_arm64 -platform=darwin_arm64`.
Safe Diagnostic Command:
cat .terraform.lock.hcl
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Lock file lacks checksum hashes for the current CI OS/architecture (e.g. `linux_arm64`). Recommended diagnostic: `cat .terraform.lock.hcl`. Remediation: Run `terraform providers lock -platform=linux_amd64 -platform=linux_arm64 -platform=darwin_arm64`.
Worked Examples
- Run `cat .terraform.lock.hcl` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-tf-provider-lockfile-inconsistent · Independently verified: 2026-11-25