Moving a Mesh Between Compartments
Move a mesh from one compartment to another in Service Mesh.
After you move a mesh to a new compartment, inherent policies apply immediately and affect access to the mesh through the Console. For more information, see Managing Compartments.
Before you proceed, you must set up the appropriate OCI policies for the mesh resource. For details, see Required IAM Policy for a Mesh.
- Open the navigation menu and click Developer Services. Under Containers & Artifacts, click Service Mesh.
- Click Service Meshes.
- On the Service Mesh page, from the list of compartments on the left side, select a compartment.
- From the list of meshes, click the mesh name that you want to move.
- On the details page, click Move resource.
- In the Move resource dialog box, select the destination compartment.
- Click Move resource.
To see what operations are available for
mesh change-compartment
use:oci service-mesh mesh change-compartment -h
To move a mesh using the CLI:
- Run
oci service-mesh mesh change-compartment
to move the mesh:
oci service-mesh mesh change-compartment --compartment-id <compartmentId> --mesh-id <meshId>
Where:
<compartmentId>
: the OCID of the compartment to which to move the mesh.<meshId>
: the OCID of the mesh to move. To find out the mesh's OCID, see Listing Meshes.
For example:
oci service-mesh mesh change-compartment --compartment-id ocid1.compartment.oc1..aaa... --mesh-id ocid1.mesh.oc1.iad.aaa...
The response to the command includes:
- The life-cycle state (for example, ACTIVE, FAILED).
- The ID of the work request to move the mesh (details of work requests are available for seven days after completion, cancellation, or failure).
If you want the command to wait to return control until the mesh is active (or the request has failed), include either or both of the following parameters:
--wait-for-state SUCCEEDED
--wait-for-state FAILED
For example:
oci service-mesh mesh change-compartment --compartment-id ocid1.compartment.oc1..aaa... --mesh-id ocid1.meshmesh.oc1.iad.aaa... --wait-for-state SUCCEEDED
Note that you can't use the mesh until the mesh has successfully moved to the target compartment and the mesh is active.
To see the status of the mesh, enter:
oci service-mesh mesh get --mesh-id <meshId>
To view the status of the work request that is moving the mesh, refer to Service Mesh Work Requests.
For more information about using the CLI, see:
- Run
Use the ChangeMeshCompartment operation to move a mesh.