How to Move Resources between Projects

Projects let you organize your DigitalOcean resources into groups that fit the way you work. Create projects that align with the applications, environments, and clients that you host on DigitalOcean.


Moving resources from one project lets you reorganize as your infrastructure changes and grows.

You can move resources in two ways:

  • Individually from any one project into any other project.
  • In bulk from any number of projects into any single project.

Move Resources Individually Using the Control Panel

From a project’s default page, click the Resources tab. Find the resource you want to move and open its options menu, represented by three dots, then select Move to…:

More menu opened with Move to highlighted

In the Select project window that opens, select the project where you want to move that resource, then click Move to [Project Name]:

More menu opened with Select project opened

A message appears confirming that the resource has been moved to the new project, and you should no longer see it among the original project’s resources. This returns you to the original project’s resource tab, where you can move other resources.

Move Resources in Bulk Using the Control Panel

To move multiple resources at one time, navigate to the destination project where the resources need to go. From there, click the Move Resources button.

Move Resources button

When you click into the text area, a list of all movable resources from other projects opens. You can keep typing to filter the list.

Click the names of the resources you want to move, then click the Move to [Project Name] button.

Move Resources window

The selected resources move into the current project.

Move Resources Using the CLI

You can move resources between projects individually or in bulk by providing a list of Uniform Resource Names (URNs) in the resource field of the following doctl command. You can retrieve a list of URNs using the doctl projects resources list command.

How to Assign Resources to a Project Using the DigitalOcean CLI
  1. Install doctl, the DigitalOcean command-line tool.

  2. Create a personal access token and save it for use with doctl.

  3. Use the token to grant doctl access to your DigitalOcean account.

              doctl auth init
              
  4. Finally, run doctl projects resources assign. Basic usage looks like this, but you can read the usage docs for more details:

                doctl projects resources assign <project-id> --resource=<urn> [--resource=<urn> ...] [flags]