Moving a DRG to a Different Compartment

Move a dynamic routing gateway (DRG) from one compartment to another.

You can move a DRG from one compartment to another. When you move a DRG to a new compartment, inherent policies apply immediately.

For more information about using compartments and policies to control access to your cloud network, see Access Control. For general information about compartments, see Managing Compartments.

    1. Open the navigation menu and click Networking. Under Customer connectivity, click Dynamic routing gateway.
    2. Under List Scope, select the compartment that contains the DRG that you want to move.
      The page updates to display only the resources in that compartment. If you're not sure which compartment to use, contact an administrator. For more information, see Access Control.
    3. Find the DRG in the list, click the Actions menu (Actions Menu), and then click Move Resource.
    4. Choose the destination compartment from the list.
    5. Click Move Resource.
  • Use the network drg change-compartment command and required parameters to move a DRG from one compartment to another:

    oci network drg change-compartment --drg-id  ocid --compartment-id new-compartment-ocid [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the ChangeDrgCompartment operation to move a DRG from one compartment to another.