oci_core_vnic_attachment

This resource provides the Vnic Attachment resource in Oracle Cloud Infrastructure Core service.

Creates a secondary VNIC and attaches it to the specified instance. For more information about secondary VNICs, see Virtual Network Interface Cards (VNICs).

Example Usage

resource "oci_core_vnic_attachment" "test_vnic_attachment" {
    #Required
    create_vnic_details {

        #Optional
        assign_ipv6ip = var.vnic_attachment_create_vnic_details_assign_ipv6ip
        assign_private_dns_record = var.vnic_attachment_create_vnic_details_assign_private_dns_record
        assign_public_ip = var.vnic_attachment_create_vnic_details_assign_public_ip
        defined_tags = var.vnic_attachment_create_vnic_details_defined_tags
        display_name = var.vnic_attachment_create_vnic_details_display_name
        freeform_tags = var.vnic_attachment_create_vnic_details_freeform_tags
        hostname_label = var.vnic_attachment_create_vnic_details_hostname_label
        ipv6address_ipv6subnet_cidr_pair_details = var.vnic_attachment_create_vnic_details_ipv6address_ipv6subnet_cidr_pair_details
        nsg_ids = var.vnic_attachment_create_vnic_details_nsg_ids
        private_ip = var.vnic_attachment_create_vnic_details_private_ip
        skip_source_dest_check = var.vnic_attachment_create_vnic_details_skip_source_dest_check
        subnet_id = oci_core_subnet.test_subnet.id
        vlan_id = oci_core_vlan.test_vlan.id
    }
    instance_id = oci_core_instance.test_instance.id

    #Optional
    display_name = var.vnic_attachment_display_name
    nic_index = var.vnic_attachment_nic_index
}

Argument Reference

The following arguments are supported:

* IMPORTANT * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Vnic Attachment * update - (Defaults to 20 minutes), when updating the Vnic Attachment * delete - (Defaults to 20 minutes), when destroying the Vnic Attachment

Import

VnicAttachments can be imported using the id, e.g.

$ terraform import oci_core_vnic_attachment.test_vnic_attachment "id"