Skip to content

Use reserved public IP when creating instance #1565

Closed
@OscarB7

Description

@OscarB7

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

I would like to use a reserved public IP for an instance to keep the same IP if the instance is re-created. I can create the reserved public IP with resource "oci_core_public_ip". Now for the instance, the block resource "oci_core_instance" does not have an option to attach or associate the existing VNIC.
Is there another resource block to attach the existing VNIC to the instance? I see the opcion in the OCI web console as explained in this article

New or Affected Resource(s)

resource "oci_core_instance" could be modified to allow this option. Maybe a new resource to assign and unassign public ip.

Potential Terraform Configuration

A new section that assign a VNIC. This would be the most basic since OCI allows more VNIC.

resource "oci_core_instance" "test_instance" {
    ...
    assign_vnic_details {
        public_ip = oci_core_public_ip.test_public_ip.id
        ...
    }
    ...
}

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions