Moving a Resource from One Project to Another
Learn why and how to move resources from one Terraform project to another.
Moving a resource
When Terraform projects become large or you want to refactor them, you may need to move a resource from one Terraform project to another. To do this, you cannot simply delete the resource from the Terraform project and add it to the other. If you do, then Terraform will physically delete the resource and recreate it again in the other project. This is often not desirable as it will cause a loss of availability and/or data.
Get hands-on with 1400+ tech skills courses.