Moving an Internet Gateway to a Different Compartment

Move an internet gateway into a different compartment within the same tenancy.

You can move an internet gateway from one compartment to another. When you move an internet gateway 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, click Networking, and then click Virtual cloud networks.
    2. Click the name of the VCN you're interested in.
    3. Under Resources, click Internet Gateway.
    4. Click the the Actions menu (Actions Menu) for the internet gateway, and then click Move Resource.
    5. Choose the destination compartment from the list.
    6. Click Move Resource.
  • Use the network internet-gateway change-compartment command and required parameters to move an internet gateway to a different compartment:

    oci network internet-gateway change-compartment --ig-id ig-ocid --compartment-id target-compartment-ocid  ... [OPTIONS]

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

  • Run the ChangeInternetGatewayCompartment operation to move an internet gateway into a different compartment.

    For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.