简体   繁体   English

如何将 GCP 项目从一个组织迁移到另一个组织

[英]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.我在 GCP 上创建了一个项目来运行我的移动应用程序,我正在免费试用,在我意识到试用结束并且我丢失了我的项目之前,我想看看我是否可以恢复该项目并将其迁移到我公司的 gcp 帐户我刚刚创建。

thanks!谢谢!

Projects within GCP undergo a 30 day grace period before the resources are fully deleted. GCP 中的项目在完全删除资源之前会经历 30 天的宽限期。 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.如果项目已超过30 天宽限期,则该项目上的资源现在将被完全删除且无法恢复。

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.在要移动的项目上为电子邮件帐户授予Project Mover (*访问更新和移动项目的权限)角色。

  2. Give the email account the Project Creator role on the destination Organization为电子邮件帐户提供目标组织的Project Creator角色

  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在源组织和目标组织上,您将需要roles/orgpolicy.policyAdmin (组织策略管理员)角色,或者您可以只为两个组织的电子邮件帐户提供组织管理员角色

  4. Check below constraints (this is in IAM & Admin > Organization Policies):检查以下限制(在 IAM & Admin > Organization Policies 中):

    a.一个。 Source Org > Allow constraints/resourcemanager.allowedExportDestinations来源组织 > 允许constraints/resourcemanager.allowedExportDestinations
    b.湾。 Destination Org > Allow constraints/resourcemanager.allowedImportSources目标组织 > 允许constraints/resourcemanager.allowedImportSources

  5. Then issue this command in Cloud Shell once all the above requirements are met:一旦满足上述所有要求,然后在 Cloud Shell 中发出此命令:
    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:关于在组织之间移动项目 [ 1 ],这里是所需权限和策略的摘要:

Permissions on the Source organization :对源组织的权限

The person moving the project needs to have roles/resourcemanager.projectMover on the organization.移动项目的人需要在组织中具有roles/resourcemanager.projectMover Alternatively, the person can have resourcemanager.projects.update permission on the project and have resourcemanager.projects.move permission on the parent (organization).或者,此人可以拥有项目的resourcemanager.projects.update权限和父级(组织)的resourcemanager.projects.move权限。

Permissions on the destination organization:对目标组织的权限:

The same person moving the project needs to have roles/resourcemanager.projectCreator on the organization.移动项目的同一个人需要在组织中拥有roles/resourcemanager.projectCreator

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.在要移动的项目的父资源上,设置包含constraints/resourcemanager.allowedExportDestinations约束的组织策略。 On the destination resource, set an organization policy that includes the constraints/resourcemanager.allowedImportSources constraint.在目标资源上,设置包含constraints/resourcemanager.allowedImportSources约束的组织策略。

On the source and destination organization resources, you must have the roles/orgpolicy.policyAdmin role, which grants permission to create and manage organization policies.在源和目标组织资源上,您必须具有roles/orgpolicy.policyAdmin角色,该角色授予创建和管理组织策略的权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 需要将 Spanner 数据库从一个 GCP 项目迁移到另一个 - Need to migrate Spanner db from one GCP Project to another 无法迁移 GCP 项目 - Unable to Migrate GCP Project 如何在 Prometheus 中从我的 GCP 组织导出 SLO? - How to export SLO's from my GCP organization in Prometheus? 我如何导出(到文件)所有在 GCP 组织中每个项目具有特定角色的人? - How do I export(to a file) all people with a certain role per project in an organization in GCP? 如何在 Compute Engine 中将 Persistence Disk 从一个项目迁移到另一个项目? - How I can migrate a Persistence Disk from one project to another, in Compute Engine? Postgres 的 GCP 数据库迁移服务 - 如何迁移名称不是“postgres”的数据库? - GCP Database migration service for Postgres - how to migrate a database with a name other than "postgres"? 如何列出 GCP 中属于特定组织的所有项目 - How to list all projects in GCP that belongs to a specific organization 如何在谷歌云平台(GCP)中创建组织下的文件夹? - How to create folders under the organization in Google Cloud Platform (GCP)? 项目 A 下的资源迁移到 GCP 中同一组织中的项目 B - Resource Under Project A migrate to Project B in same organisation in GCP 将项目从“无组织”迁移到组织时,是否会转移 IAM 策略? - Are IAM policies transferred when migrating a project from "No organization" to an organization?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM