Choosing Whether an Ephemeral Public IP is Assigned at Instance Creation

You can choose whether to assign an ephemeral public IP address to an instance when you create it.

  • When you launch an instance into a public subnet, there's an Assign a public IPv4 address checkbox on the Create Compute Instance page. By default, the checkbox is selected, and the instance gets an ephemeral public IP.

    If you don't want an ephemeral public IP assigned, you can either:

  • Use the network public-ip create command and required parameters to assign a public IP:

    oci network public-ip create --compartment-id compartment_OCID --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.