Moving GCP Projects Between IAM Organizations

Lukas Karlsson
Jul 28, 2017 · 1 min read

Once a GCP project has been associated with an IAM Organization, there is no way to move the project out of the organization (on your own). However, this can be accomplished with the help of Google Enterprise Support.

Process

  1. Create a list of projects that you’d like to move.
  2. Move all the projects out of any folders in the current organization and into the top level.
  3. Contact Support with a list of projects that you’d like to move from the current organization to another organization.
  4. Support will move the projects out of the current organization so they have no parent (no organization).
  5. Move all the projects into the new organization.

Example

Create a list of projects:

bash$ cat > projects.txt << EOF
project-1
project-2
project-3
EOF

Get the organization ID of the current org (ex. mydomain.com):

bash$ gcloud organizations list | grep '^mydomain.com'
mydomain.com 123456789012 C00123456

Move projects to top level of the organization:

bash$ for project in `cat projects.txt`; do
gcloud alpha projects move $project --organization 123456789012
done

Contact Google support about moving your project out of the organization.

Once Google support has confirmed your projects have been moved out of the organization, then you can move them into the new organization.

Get the organization ID of the new org (ex. mynewdomain.com):

bash$ gcloud organizations list | grep '^mynewdomain.com'
mynewdomain.com 987654321098 C00987654

Move projects into new org:

bash$ for project in `cat projects.txt`; do
gcloud alpha projects move $project --organization 987654321098
done

Now, all of the projects in projects.txt will be in the new organization!

Google Cloud Platform - Community

A collection of technical articles published or curated by Google Cloud Platform Developer Advocates. The views expressed are those of the authors and don't necessarily reflect those of Google.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade