Preserve state when refactoring module paths or names.
Section: Upgrade and Migration
Moved module address snippet
hcl
hcl
moved {
from = module.network.aws_subnet.private["a"]
to = module.vpc.aws_subnet.private["a"]
}Explanation
Preserve state when refactoring module paths or names.
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.
Upgrade after version changes
Refresh provider selections and lock file after changing constraints.
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.