Moving a Compute Cluster to a Different Compartment

After you create a compute cluster, you can move it to a different compartment.

Required IAM Policy

To use Oracle Cloud Infrastructure, you must be granted security access in a policy  by an administrator. This access is required whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don’t have permission or are unauthorized, verify with your administrator what type of access you have and which compartment  to work in.

For administrators: To allow users to do all things with compute clusters in all compartments, write the following policy:

Allow group ComputeClusterUsers to manage compute-clusters in tenancy

You must also allow users to create instances in cluster networks. For a typical policy, see Let users launch compute instances.

Using the Console

  1. Open the navigation menu and click Compute. Under Compute, click Compute Clusters.

  2. Click the compute cluster that you're interested in.
  3. Click Move resource.
  4. Choose the destination compartment from the list.
  5. Click Move resource.
  6. Optionally, move the instances and other resources that are associated with the compute cluster to the new compartment.

Using the API

Use the ChangeComputeClusterCompartment operation.

Using the CLI

Use the compute-cluster change-compartment command.

oci compute compute-cluster change-compartment --compute-cluster-id <compute_cluster_OCID> --compartment-id <compartment_OCID>

For information about using the CLI, see Command Line Interface (CLI).