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, policies applied to that compartment apply immediately to the DRG.

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

    1. On the Dynamic Routing Gateways list page, find the DRG that you want to move. If you need help finding the list page or the DRG, see Listing DRGs.
    2. From the Actions menu Actions Menu for the DRG, select Move Resource.
    3. In the Move resource panel, select the destination compartment from the list.
    4. Select 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.