[英]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:您需要:
Give the email account the Project Mover
(*access to update and move projects) role on the Project to be moved.在要移动的项目上为电子邮件帐户授予
Project Mover
(*访问更新和移动项目的权限)角色。
Give the email account the Project Creator
role on the destination Organization为电子邮件帐户提供目标组织的
Project Creator
角色
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
(组织策略管理员)角色,或者您可以只为两个组织的电子邮件帐户提供组织管理员角色
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
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.