Moving a project  |  Resource Manager Documentation  |  Google Cloud (2023)

Table of Contents
Console gcloud API Videos
Stay organized with collections Save and categorize content based on your preferences.

This guide explains how to move a project within your organization.

The project resource is the base-level organizing entity in aGoogle Cloud organization. Projects are createdunder organizations, and can be placed under folders or the organizationresource itself, forming theresource hierarchy. You can move projectresources within your resource hierarchy, but should consider the policyimplications of the move before you make it.

When you move a project, any Identity and Access Management policies or organization policies thatare directly attached will move with it. However, a project in your resourcehierarchy is also affected by the policies that it inherits from parentresources. If a project inherits an IAM role that provides userspermission to use a particular service, users will not have access to thatservice at the destination unless it would inherit the permission at thedestination as well.

For example, consider a service account has the Storage Object Creatorrole bound to a user at Folder A. The service account has permissions to uploaddata to Cloud Storage in any project in Folder A. If you moved one of theseprojects Folder B, which does not have the same inherited permissions, theservice account for that project loses the ability to upload data, resulting ina service outage.

(Video) How to Use Folders in Cloud Resource Manager

These same considerations apply if organization policies are defined at thesource and destination folders. Like IAM policies, organizationpolicies are inherited. Consequently, you must ensure that your organizationpolicies are consistent between source and destination folders.

To learn more about organization policies, seeIntroduction to the organization Policy Service.

To move a project, you need the Project Mover IAM role(roles/resourcemanager.projectMover) on both the source folder and thedestination folder. If the resource is not in a folder, you need this role onthe organization node.

These roles give you the following required permissions:

  • resourcemanager.projects.update on the project
  • If the resource is in a folder: resourcemanager.projects.move on thesource folder and the destination
  • If the resource is not in a folder: resourcemanager.projects.move on theorganization node

You can also gain these permissions with customroles, or other predefined roles.

Console

To move a project:

(Video) Google Cloud Platform resource management

  1. In the Google Cloud console, go to the Manage resources page.

    Go to Manage resources

  2. Select your Organization from the Organization drop-down on the topleft of the page.

  3. Click on your project's row to select your project from the list ofresources. Note that you must not click on the name of theproject, which takes you to the project's IAM page.

  4. Click on the options menu (the vertical ellipsis) in the row and clickMove.

  5. Click Browse to select the folder to which you want to move theproject.

  6. Click Move.

    (Video) Create Folders and Projects in Google Cloud Organization Hierarchy |Demo in Action: Part-1

gcloud

To move a project, run thegcloud beta projects movecommand:

gcloud beta projects move PROJECT_ID \--DESTINATION_TYPE DESTINATION_ID

Where:

  • PROJECT_ID is the ID or number of the project you wish tomove.

  • DESTINATION_TYPE is either organization or folder.

  • DESTINATION_ID is the ID of the organization or folder to whichyou want to move the project. You can only specify one target.

API

You can use the v3projects.move methodto move a project.

Request:

(Video) Projects in Google Cloud Platform explained

POST https://cloudresourcemanager.googleapis.com/v3/{name=PROJECT_NAME}:move{ "destinationParent": DESTINATION_PARENT}

Where:

  • PROJECT_NAME is the name of the project you wantto update. For example, projects/415104041262

  • DESTINATION_PARENT is the new parent organizationor folder under which you want to move the project. For example:organizations/12345678901

If successful, the request will return anOperation whichcan be used to track the project move.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2023-01-11 UTC.

(Video) Projects in Google Cloud Platform | GCP Project Structure | Edureka | GCP Rewind - 2

Videos

1. Google Cloud Platform’s Resource Hierarchy | A Detailed Guide by Whizlabs
(Whizlabs)
2. GCP Organization | Google Cloud Organization | Billing Accounts, Folders, Projects | DEMO
(VSPARKZ)
3. Easily Manage Resources with Google Cloud Deployment Manager | Google Cloud Labs
(Google Cloud Tech)
4. Roles And Responsibilities of a Cloud Manager | Project Manager Roles | NetCom Learning
(NetCom Learning)
5. Manage resource access with Cloud IAM
(Google Cloud Tech)
6. Episode 8: Programmatically Access Google Cloud’s Secret Manager
(SANS Cloud Security)
Top Articles
Latest Posts
Article information

Author: Stevie Stamm

Last Updated: 12/04/2022

Views: 5899

Rating: 5 / 5 (60 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Stevie Stamm

Birthday: 1996-06-22

Address: Apt. 419 4200 Sipes Estate, East Delmerview, WY 05617

Phone: +342332224300

Job: Future Advertising Analyst

Hobby: Leather crafting, Puzzles, Leather crafting, scrapbook, Urban exploration, Cabaret, Skateboarding

Introduction: My name is Stevie Stamm, I am a colorful, sparkling, splendid, vast, open, hilarious, tender person who loves writing and wants to share my knowledge and understanding with you.