Deleting a NAT Gateway

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

Prerequisite: Before you delete a NAT 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 refers to 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 refer to a gateway.

This operation is asynchronous. The NAT gateway's lifecycleState state changes to TERMINATING temporarily until the NAT gateway is removed.

    1. Open the navigation menu , select Networking, and then select Virtual cloud networks.
    2. Select the name of the VCN that you're interested in.
    3. Under Resources, select NAT Gateways.
    4. For the NAT gateway that you want to delete, select the Actions menu (Actions Menu), and then select Terminate.
    5. To confirm, select Terminate.
  • Use the network nat-gateway delete command and required parameters to delete a NAT gateway:

    oci network nat-gateway delete --nat-gateway-id nat-ocid  ... [OPTIONS]

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

  • Run the DeleteNatGateway operation to delete a NAT gateway.