Refresh provider selections and lock file after changing constraints.
Section: Upgrade and Migration
Upgrade after version changes
bash
bash
terraform init -upgrade && terraform providers lock -platform=linux_amd64 -platform=darwin_arm64Explanation
Refresh provider selections and lock file after changing constraints.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Upgrade and Migration
Legacy 0.13 upgrade helper
Legacy helper command that updated provider source declarations in Terraform 0.13.
Moved module address snippet
Preserve state when refactoring module paths or names.
Inspect provider schemas
Dump provider schemas for automation or debugging tools.
Enable TRACE logs
Turn on maximum logging detail for hard-to-diagnose issues.
Detect and record drift
Refresh state from real infrastructure without proposing config changes.