Splitting a GCP Organization In Two

Our company is splitting into two organizations. We’re using Terraform open source and need to make a copy of the Terraform code to use for the new organization. The new organization will not need several of the existing projects and will need a new project to be created. Then there are several existing projects that need to be migrated over in GCP to the new organization.

I’m wondering how we would go about accomplishing this. Would we do something like the following:

  1. Bootstrap the new organization outside Terraform or use a separate TF to bootstrap the org.
  2. Copy the Terraform Code to be used for the new org (update the org id) and don’t copy the state file
  3. Run the TF code in the new organization, which will create a new state file
  4. In TF, delete the projects that aren’t needed and create the new project in TF. Run TF apply.
  5. Delete the projects in the GCP console that need to be migrated from the first org and migrate those projects manually.
  6. Somehow associate the state file with the projects that were just migrated. Since the project IDs are the same after the migration, I don’t know if anything needs to be modified in the state file.
  7. Run TF apply