move
move an environment to another project
📦 Move an environment to another project in the same account.
The environment's services, preview environments and alert rules move with it. Nothing restarts and every URL, custom domain and volume keeps working: they don't depend on the project.
Each service lands in the target project: a service with the same name there is reused; otherwise the service moves if it has no other environments, or a copy with the same name and tier is created if it does. People with access to the target project get access to the environment, including its variables and secrets.
You need write access to both projects. A preview environment can't be moved on its own; it moves with its source environment. Move it back the same way.
The environment is the argument, else your default (set with
csph environment use <id>), else COMPUTESPHERE_ENVIRONMENT. --project takes
a project id or name.
Usage​
csph environments move [environment-id] [flags]
Aliases​
environments move, environments mv, env move, env mv, envs move, envs mv, environment move, environment mv
Options​
Command Specific​
Formatting​
For more information about formatting options, see Formatting.
Inherited​
Examples​
# move an environment to the project named storefront
> csph environments move <environment-id> --project storefront
# move your default environment, by project id, as JSON
> csph environments move --project <project-id> -o json
See also​
- csph environments — manage environments
- csph environments get — get environments
- csph environments list — list environments
- csph environments create — create environments
- csph environments update — update environments
- csph environments delete — delete environments
- csph environments use — set your default environment
- csph environments variables — manage environment variables
- csph environments secrets — manage environment secrets
- csph environments domain-path — map URL paths on the environment's domains to deployments
- csph environments default-url — turn the environment's default URL off or on