Moving a Project between Workplaces Moving a Project between Workplaces

Moving a Project between Workplaces

Joel Watson Joel Watson

Unfortunately, there's not currently an easy way to move projects between workplaces. This is something we hope to add at some point in the future. That said, you can still accomplish the same goal relatively easily by exporting and importing your secrets to the new project.

To do that, first create the destination project under your new workplace. Next, create a service token with write permissions for each config you want to copy over to this new project (we recommend setting an expiration time on these tokens so they'll be cleaned up automatically after they expire). Once you have these service tokens, you'll need to run the following command using the appropriate token for each destination config:

DOPPLER_TOKEN=xxxxxxx doppler secrets upload -p $DST_PROJECT -c $DST_CONFIG <(doppler secrets download -p $SRC_PROJECT -c $SRC_CONFIG --no-file --json)

This is piping the output from doppler secrets download into doppler secrets upload. You need to set the SRC_PROJECT, SRC_CONFIG, DST_PROJECT and DST_CONFIG variables (or just replace them with actual values) before you run this. The DOPPLER_TOKEN variable should be the service token you have corresponding with the destination config and project.

Note that this process assumes your CLI is logged into the source workplace – if not, then you may need to specify a DOPPLER_TOKEN for the doppler secrets download command too).

Was this article helpful?

0 out of 0 found this helpful