Assigning an Ephemeral Public IP When Creating a Secondary VNIC
When you add a secondary VNIC to an instance, you choose whether the primary private IP on the new VNIC gets an ephemeral public IP.
This choice is available only if the secondary VNIC is in a public subnet.
In the Create VNIC dialog box, there's an Assign a public IPv4 address checkbox. By default, the checkbox is unselected, which means the secondary VNIC doesn't get an ephemeral public IP. You must select Assign a public IPv4 address.
Use the network public-ip create command and required parameters to assign a public IP:
oci network public-ip create --compartment-id compartment_ID --lifetime EPHEMERAL --private-ip-id private_IP_OCID ... [OPTIONS]
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the CreatePublicIp operation to create a public IP.