简体   繁体   中英

How to migrate a GCP Project from one organization to other

I had created a project on GCP to run my mobile app and I was on a free trial and before I realized the trial ended and I lost my project, I wanted to see if I can recover and migrate that project to my company's gcp account that I just created.

thanks!

Projects within GCP undergo a 30 day grace period before the resources are fully deleted. As the Project needs an active Billing account, which is automatically closed if you did not opt to upgrade it to aPaid Account .

If the Project is already past 30 day grace period , the resources on that project are now fully deleted and cannot be recovered.

For your question on Migrating the Project from one Organization to another.

You would need to:

  1. Give the email account the Project Mover (*access to update and move projects) role on the Project to be moved.

  2. Give the email account the Project Creator role on the destination Organization

  3. On the Source and Destination Organizations, you will need the roles/orgpolicy.policyAdmin (Organization Policy Admin) role or you can just give the email account the Organization Admin role for both Organizations

  4. Check below constraints (this is in IAM & Admin > Organization Policies):

    a. Source Org > Allow constraints/resourcemanager.allowedExportDestinations
    b. Destination Org > Allow constraints/resourcemanager.allowedImportSources

  5. Then issue this command in Cloud Shell once all the above requirements are met:
    gcloud beta projects move [Project-ID] --organization [ORG-ID]
    OR
    gcloud beta projects move PROJECT_ID \ --organization ORGANIZATION_ID

You may also check this documentation for reference

In regards to move the projects between organizations[ 1 ], here is a summary of permissions and policies that are needed:

Permissions on the Source organization :

The person moving the project needs to have roles/resourcemanager.projectMover on the organization. Alternatively, the person can have resourcemanager.projects.update permission on the project and have resourcemanager.projects.move permission on the parent (organization).

Permissions on the destination organization:

The same person moving the project needs to have roles/resourcemanager.projectCreator on the organization.

Organization policy permissions:

On the parent resource to the project you want to move, set an organization policy that includes the constraints/resourcemanager.allowedExportDestinations constraint. On the destination resource, set an organization policy that includes the constraints/resourcemanager.allowedImportSources constraint.

On the source and destination organization resources, you must have the roles/orgpolicy.policyAdmin role, which grants permission to create and manage organization policies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM