Quick Action: Connecting a Private Subnet to the Internet
When you create a compute instance, additional steps are necessary to enable it to contact a host on the internet or accept connections from the internet. You can use a quick action to connect a private subnet to the internet.
Before you begin:
Quick actions provide an easy way to set up resources. To use this quick action, you must have created at least one compute instance with at least one private IP address and no public IP addresses.
About this task:
This quick action performs the steps to enable an instance to contact a host on the internet or accept a connection from a user on the internet. The quick action also creates the following resources:
Open the navigation menu and select Compute. Under Compute, select Instances.
Select the instance that you're interested in. It needs to have at least one private IP address but no public IP address.
Select Quick actions in the left navigation menu.
Select Connect private subnet to internet.
Enter the following values:
Resource name prefix: This prefix is applied to the name of any resource created by the quick action, such as a route table, gateway, or network security group.
NAT Gateway: If the instance's IP address is in a private subnet of a VCN that already has a NAT gateway, the quick action detects that fact and use the gateway in the route table changes. Otherwise, it creates a new NAT gateway named <resource-name-prefix>-NAT.
Network security group: If your instance's VNIC has already reached its limit of five NSGs or the VCN is at its NSG limit, you need to select an existing NSG. Otherwise, the quick action creates a new NSG for this instance's VNIC.
Route table: If the instance's IP address is in a subnet that already has a route table, route rule changes are made to that route table. Otherwise, a new route table is created for that subnet, with a rule pointing to the NAT gateway.
Select Create.
Wait briefly while new resources are created or existing resources are modified.
Select Close.
The compute instance is now able to connect to other hosts on the internet. The required gateway, security settings, and route rules are configured.