Partial resources migration with `backend migrate`
Author: TenshoCreated Jun 15, 2026Updated Sep 14, 2026
Labelsenhancementpreserved
Describe the enhancement
Sometimes I want not barely rearrange units rather split them into multiple ones and comprise a stack. It would be handy if amazing time-saver terragrunt backend migrate command would accept the list of resource addresses to move across the state boundaries.
Terraform
BEFORE
mega
abc.tf
main.tf
xyz.tf
# AFTER
abc
main.tf
small
main.tf
xyz
main.tfTerragrunt
BEFORE
mega-
terragrunt.hcl <== split state into multiple ones during refactoring
AFTER
mega
abc
terragrunt.hcl
small
terragrunt.hcl
xyz
terragrunt.hcl$ terragrunt backend migrate mega mega/abc --addresses module.abc.null_resource.a null_resource.defaultAdditional context
Terraform used to have similar functionality for local backend in the past:
$ terraform state mv -state=mega.tfstate -state-out=abc.tfstate module.abc.null_resource.a module.abc.null_resource.b module.abc.null_resource.cHowever:
$ terraform state mv --help
...
-state, state-out, and -backup are legacy options supported for the local
backend only. For more information, see the local backend's documentation.RFC Not Needed
- I have evaluated the complexity of this enhancement, and I believe it does not require an RFC.
Source: gruntwork-io/terragrunt