Moving a Virtual Deployment Between Compartments

Move a virtual deployment from one compartment to another in Service Mesh.

After you move a virtual deployment to a new compartment, inherent policies apply immediately and affect access to the virtual deployment through the Console. For more information, see Managing Compartments.

    1. Open the navigation menu and click Developer Services. Under Containers & Artifacts, click Service Mesh.
    2. Click Service Meshes.
    3. On the Service Mesh page, from the list of compartments on the left side, select a compartment.
    4. From the list of meshes, click the mesh name that contains the virtual services, which has the virtual deployment that you want to move.
    5. On the details page of the mesh, click the name of the virtual service.
    6. On the details page of the virtual service, click the name of the virtual deployment that you want to move.
    7. On the details page of the virtual deployment, click Move resource.
    8. In the Move resource dialog box, select the destination compartment.
    9. Click Move resource.
  • To move a virtual deployment from one compartment to another, use the service-mesh resource with the virtual-deployment option. Provide the compartment ID for the target compartment for the virtual deployment.

    oci service-mesh virtual-deployment change-compartment --virtual-deployment-id <virtual-deployment-id> --compartment-id <compartment-id>

    Example:

    oci service-mesh virtual-deployment change-compartment --virtual-deployment-id ocid.meshvirtualdeployment.oc1.iad.aaaa.... --compartment-id ocid.compartment.oc1.iad.aaaa....

    To see what operations are available for virtual-deployment change-compartment use:

    oci service-mesh virtual-deployment change-compartment -h
  • Use the ChangeVirtualDeploymentCompartment operation to move a virtual deployment.