Deleting an Internet Gateway

Delete an internet gateway from a Virtual Cloud Network (VCN) in Networking.

Prerequisite: Before you delete an internet gateway, delete all route rules in the VCN that specify the gateway as the target. Deleting those rules stops the routing in the VCN to the gateway. If a route rule references the gateway, it can't be deleted until the reference is removed.

See Listing VCN Route Tables and Updating a VCN Route Table's Rules for more about finding and updating route rules that reference` a gateway.

    1. On the Virtual Cloud Networks list page, select the VCN that contains the gateway that you want to work with. If you need help finding the list page or the VCN, see Listing VCNs.
    2. On the details page, perform one of the following actions depending on the option that you see:
      • On the Gateways tab, go to the Internet Gateways section.
      • Under Resources, select Internet Gateway.
    3. From the the Actions menu (three dots) for the gateway that you want to delete, select Terminate.
    4. When prompted, confirm the deletion.
  • Use the network internet-gateway delete command and required parameters to delete an internet gateway:

    oci network internet-gateway create --ig-id ig-ocid  ... [OPTIONS]
  • Run the DeleteInternetGateway operation to delete an internet gateway.

    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.