1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. VnicAttachment
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Core.VnicAttachment

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testVnicAttachment = new oci.core.VnicAttachment("test_vnic_attachment", {
        createVnicDetails: {
            assignIpv6ip: vnicAttachmentCreateVnicDetailsAssignIpv6ip,
            assignPrivateDnsRecord: vnicAttachmentCreateVnicDetailsAssignPrivateDnsRecord,
            assignPublicIp: vnicAttachmentCreateVnicDetailsAssignPublicIp,
            definedTags: vnicAttachmentCreateVnicDetailsDefinedTags,
            displayName: vnicAttachmentCreateVnicDetailsDisplayName,
            freeformTags: vnicAttachmentCreateVnicDetailsFreeformTags,
            hostnameLabel: vnicAttachmentCreateVnicDetailsHostnameLabel,
            ipv6addressIpv6subnetCidrPairDetails: vnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetails,
            nsgIds: vnicAttachmentCreateVnicDetailsNsgIds,
            privateIp: vnicAttachmentCreateVnicDetailsPrivateIp,
            securityAttributes: vnicAttachmentCreateVnicDetailsSecurityAttributes,
            skipSourceDestCheck: vnicAttachmentCreateVnicDetailsSkipSourceDestCheck,
            subnetId: testSubnet.id,
            vlanId: testVlan.id,
        },
        instanceId: testInstance.id,
        displayName: vnicAttachmentDisplayName,
        nicIndex: vnicAttachmentNicIndex,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_vnic_attachment = oci.core.VnicAttachment("test_vnic_attachment",
        create_vnic_details={
            "assign_ipv6ip": vnic_attachment_create_vnic_details_assign_ipv6ip,
            "assign_private_dns_record": vnic_attachment_create_vnic_details_assign_private_dns_record,
            "assign_public_ip": vnic_attachment_create_vnic_details_assign_public_ip,
            "defined_tags": vnic_attachment_create_vnic_details_defined_tags,
            "display_name": vnic_attachment_create_vnic_details_display_name,
            "freeform_tags": vnic_attachment_create_vnic_details_freeform_tags,
            "hostname_label": vnic_attachment_create_vnic_details_hostname_label,
            "ipv6address_ipv6subnet_cidr_pair_details": vnic_attachment_create_vnic_details_ipv6address_ipv6subnet_cidr_pair_details,
            "nsg_ids": vnic_attachment_create_vnic_details_nsg_ids,
            "private_ip": vnic_attachment_create_vnic_details_private_ip,
            "security_attributes": vnic_attachment_create_vnic_details_security_attributes,
            "skip_source_dest_check": vnic_attachment_create_vnic_details_skip_source_dest_check,
            "subnet_id": test_subnet["id"],
            "vlan_id": test_vlan["id"],
        },
        instance_id=test_instance["id"],
        display_name=vnic_attachment_display_name,
        nic_index=vnic_attachment_nic_index)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Core.NewVnicAttachment(ctx, "test_vnic_attachment", &Core.VnicAttachmentArgs{
    			CreateVnicDetails: &core.VnicAttachmentCreateVnicDetailsArgs{
    				AssignIpv6ip:                         pulumi.Any(vnicAttachmentCreateVnicDetailsAssignIpv6ip),
    				AssignPrivateDnsRecord:               pulumi.Any(vnicAttachmentCreateVnicDetailsAssignPrivateDnsRecord),
    				AssignPublicIp:                       pulumi.Any(vnicAttachmentCreateVnicDetailsAssignPublicIp),
    				DefinedTags:                          pulumi.Any(vnicAttachmentCreateVnicDetailsDefinedTags),
    				DisplayName:                          pulumi.Any(vnicAttachmentCreateVnicDetailsDisplayName),
    				FreeformTags:                         pulumi.Any(vnicAttachmentCreateVnicDetailsFreeformTags),
    				HostnameLabel:                        pulumi.Any(vnicAttachmentCreateVnicDetailsHostnameLabel),
    				Ipv6addressIpv6subnetCidrPairDetails: pulumi.Any(vnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetails),
    				NsgIds:                               pulumi.Any(vnicAttachmentCreateVnicDetailsNsgIds),
    				PrivateIp:                            pulumi.Any(vnicAttachmentCreateVnicDetailsPrivateIp),
    				SecurityAttributes:                   pulumi.Any(vnicAttachmentCreateVnicDetailsSecurityAttributes),
    				SkipSourceDestCheck:                  pulumi.Any(vnicAttachmentCreateVnicDetailsSkipSourceDestCheck),
    				SubnetId:                             pulumi.Any(testSubnet.Id),
    				VlanId:                               pulumi.Any(testVlan.Id),
    			},
    			InstanceId:  pulumi.Any(testInstance.Id),
    			DisplayName: pulumi.Any(vnicAttachmentDisplayName),
    			NicIndex:    pulumi.Any(vnicAttachmentNicIndex),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testVnicAttachment = new Oci.Core.VnicAttachment("test_vnic_attachment", new()
        {
            CreateVnicDetails = new Oci.Core.Inputs.VnicAttachmentCreateVnicDetailsArgs
            {
                AssignIpv6ip = vnicAttachmentCreateVnicDetailsAssignIpv6ip,
                AssignPrivateDnsRecord = vnicAttachmentCreateVnicDetailsAssignPrivateDnsRecord,
                AssignPublicIp = vnicAttachmentCreateVnicDetailsAssignPublicIp,
                DefinedTags = vnicAttachmentCreateVnicDetailsDefinedTags,
                DisplayName = vnicAttachmentCreateVnicDetailsDisplayName,
                FreeformTags = vnicAttachmentCreateVnicDetailsFreeformTags,
                HostnameLabel = vnicAttachmentCreateVnicDetailsHostnameLabel,
                Ipv6addressIpv6subnetCidrPairDetails = vnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetails,
                NsgIds = vnicAttachmentCreateVnicDetailsNsgIds,
                PrivateIp = vnicAttachmentCreateVnicDetailsPrivateIp,
                SecurityAttributes = vnicAttachmentCreateVnicDetailsSecurityAttributes,
                SkipSourceDestCheck = vnicAttachmentCreateVnicDetailsSkipSourceDestCheck,
                SubnetId = testSubnet.Id,
                VlanId = testVlan.Id,
            },
            InstanceId = testInstance.Id,
            DisplayName = vnicAttachmentDisplayName,
            NicIndex = vnicAttachmentNicIndex,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Core.VnicAttachment;
    import com.pulumi.oci.Core.VnicAttachmentArgs;
    import com.pulumi.oci.Core.inputs.VnicAttachmentCreateVnicDetailsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testVnicAttachment = new VnicAttachment("testVnicAttachment", VnicAttachmentArgs.builder()
                .createVnicDetails(VnicAttachmentCreateVnicDetailsArgs.builder()
                    .assignIpv6ip(vnicAttachmentCreateVnicDetailsAssignIpv6ip)
                    .assignPrivateDnsRecord(vnicAttachmentCreateVnicDetailsAssignPrivateDnsRecord)
                    .assignPublicIp(vnicAttachmentCreateVnicDetailsAssignPublicIp)
                    .definedTags(vnicAttachmentCreateVnicDetailsDefinedTags)
                    .displayName(vnicAttachmentCreateVnicDetailsDisplayName)
                    .freeformTags(vnicAttachmentCreateVnicDetailsFreeformTags)
                    .hostnameLabel(vnicAttachmentCreateVnicDetailsHostnameLabel)
                    .ipv6addressIpv6subnetCidrPairDetails(vnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetails)
                    .nsgIds(vnicAttachmentCreateVnicDetailsNsgIds)
                    .privateIp(vnicAttachmentCreateVnicDetailsPrivateIp)
                    .securityAttributes(vnicAttachmentCreateVnicDetailsSecurityAttributes)
                    .skipSourceDestCheck(vnicAttachmentCreateVnicDetailsSkipSourceDestCheck)
                    .subnetId(testSubnet.id())
                    .vlanId(testVlan.id())
                    .build())
                .instanceId(testInstance.id())
                .displayName(vnicAttachmentDisplayName)
                .nicIndex(vnicAttachmentNicIndex)
                .build());
    
        }
    }
    
    resources:
      testVnicAttachment:
        type: oci:Core:VnicAttachment
        name: test_vnic_attachment
        properties:
          createVnicDetails:
            assignIpv6ip: ${vnicAttachmentCreateVnicDetailsAssignIpv6ip}
            assignPrivateDnsRecord: ${vnicAttachmentCreateVnicDetailsAssignPrivateDnsRecord}
            assignPublicIp: ${vnicAttachmentCreateVnicDetailsAssignPublicIp}
            definedTags: ${vnicAttachmentCreateVnicDetailsDefinedTags}
            displayName: ${vnicAttachmentCreateVnicDetailsDisplayName}
            freeformTags: ${vnicAttachmentCreateVnicDetailsFreeformTags}
            hostnameLabel: ${vnicAttachmentCreateVnicDetailsHostnameLabel}
            ipv6addressIpv6subnetCidrPairDetails: ${vnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetails}
            nsgIds: ${vnicAttachmentCreateVnicDetailsNsgIds}
            privateIp: ${vnicAttachmentCreateVnicDetailsPrivateIp}
            securityAttributes: ${vnicAttachmentCreateVnicDetailsSecurityAttributes}
            skipSourceDestCheck: ${vnicAttachmentCreateVnicDetailsSkipSourceDestCheck}
            subnetId: ${testSubnet.id}
            vlanId: ${testVlan.id}
          instanceId: ${testInstance.id}
          displayName: ${vnicAttachmentDisplayName}
          nicIndex: ${vnicAttachmentNicIndex}
    

    Create VnicAttachment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VnicAttachment(name: string, args: VnicAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def VnicAttachment(resource_name: str,
                       args: VnicAttachmentArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def VnicAttachment(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       create_vnic_details: Optional[_core.VnicAttachmentCreateVnicDetailsArgs] = None,
                       instance_id: Optional[str] = None,
                       display_name: Optional[str] = None,
                       nic_index: Optional[int] = None)
    func NewVnicAttachment(ctx *Context, name string, args VnicAttachmentArgs, opts ...ResourceOption) (*VnicAttachment, error)
    public VnicAttachment(string name, VnicAttachmentArgs args, CustomResourceOptions? opts = null)
    public VnicAttachment(String name, VnicAttachmentArgs args)
    public VnicAttachment(String name, VnicAttachmentArgs args, CustomResourceOptions options)
    
    type: oci:Core:VnicAttachment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VnicAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VnicAttachmentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VnicAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VnicAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VnicAttachmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var vnicAttachmentResource = new Oci.Core.VnicAttachment("vnicAttachmentResource", new()
    {
        CreateVnicDetails = new Oci.Core.Inputs.VnicAttachmentCreateVnicDetailsArgs
        {
            AssignIpv6ip = false,
            AssignPrivateDnsRecord = false,
            AssignPublicIp = "string",
            DefinedTags = 
            {
                { "string", "string" },
            },
            DisplayName = "string",
            FreeformTags = 
            {
                { "string", "string" },
            },
            HostnameLabel = "string",
            Ipv6addressIpv6subnetCidrPairDetails = new[]
            {
                new Oci.Core.Inputs.VnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetailArgs
                {
                    Ipv6Address = "string",
                    Ipv6SubnetCidr = "string",
                },
            },
            NsgIds = new[]
            {
                "string",
            },
            PrivateIp = "string",
            SecurityAttributes = 
            {
                { "string", "string" },
            },
            SkipSourceDestCheck = false,
            SubnetId = "string",
            VlanId = "string",
        },
        InstanceId = "string",
        DisplayName = "string",
        NicIndex = 0,
    });
    
    example, err := Core.NewVnicAttachment(ctx, "vnicAttachmentResource", &Core.VnicAttachmentArgs{
    	CreateVnicDetails: &core.VnicAttachmentCreateVnicDetailsArgs{
    		AssignIpv6ip:           pulumi.Bool(false),
    		AssignPrivateDnsRecord: pulumi.Bool(false),
    		AssignPublicIp:         pulumi.String("string"),
    		DefinedTags: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		DisplayName: pulumi.String("string"),
    		FreeformTags: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		HostnameLabel: pulumi.String("string"),
    		Ipv6addressIpv6subnetCidrPairDetails: core.VnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetailArray{
    			&core.VnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetailArgs{
    				Ipv6Address:    pulumi.String("string"),
    				Ipv6SubnetCidr: pulumi.String("string"),
    			},
    		},
    		NsgIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		PrivateIp: pulumi.String("string"),
    		SecurityAttributes: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		SkipSourceDestCheck: pulumi.Bool(false),
    		SubnetId:            pulumi.String("string"),
    		VlanId:              pulumi.String("string"),
    	},
    	InstanceId:  pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	NicIndex:    pulumi.Int(0),
    })
    
    var vnicAttachmentResource = new VnicAttachment("vnicAttachmentResource", VnicAttachmentArgs.builder()
        .createVnicDetails(VnicAttachmentCreateVnicDetailsArgs.builder()
            .assignIpv6ip(false)
            .assignPrivateDnsRecord(false)
            .assignPublicIp("string")
            .definedTags(Map.of("string", "string"))
            .displayName("string")
            .freeformTags(Map.of("string", "string"))
            .hostnameLabel("string")
            .ipv6addressIpv6subnetCidrPairDetails(VnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetailArgs.builder()
                .ipv6Address("string")
                .ipv6SubnetCidr("string")
                .build())
            .nsgIds("string")
            .privateIp("string")
            .securityAttributes(Map.of("string", "string"))
            .skipSourceDestCheck(false)
            .subnetId("string")
            .vlanId("string")
            .build())
        .instanceId("string")
        .displayName("string")
        .nicIndex(0)
        .build());
    
    vnic_attachment_resource = oci.core.VnicAttachment("vnicAttachmentResource",
        create_vnic_details={
            "assign_ipv6ip": False,
            "assign_private_dns_record": False,
            "assign_public_ip": "string",
            "defined_tags": {
                "string": "string",
            },
            "display_name": "string",
            "freeform_tags": {
                "string": "string",
            },
            "hostname_label": "string",
            "ipv6address_ipv6subnet_cidr_pair_details": [{
                "ipv6_address": "string",
                "ipv6_subnet_cidr": "string",
            }],
            "nsg_ids": ["string"],
            "private_ip": "string",
            "security_attributes": {
                "string": "string",
            },
            "skip_source_dest_check": False,
            "subnet_id": "string",
            "vlan_id": "string",
        },
        instance_id="string",
        display_name="string",
        nic_index=0)
    
    const vnicAttachmentResource = new oci.core.VnicAttachment("vnicAttachmentResource", {
        createVnicDetails: {
            assignIpv6ip: false,
            assignPrivateDnsRecord: false,
            assignPublicIp: "string",
            definedTags: {
                string: "string",
            },
            displayName: "string",
            freeformTags: {
                string: "string",
            },
            hostnameLabel: "string",
            ipv6addressIpv6subnetCidrPairDetails: [{
                ipv6Address: "string",
                ipv6SubnetCidr: "string",
            }],
            nsgIds: ["string"],
            privateIp: "string",
            securityAttributes: {
                string: "string",
            },
            skipSourceDestCheck: false,
            subnetId: "string",
            vlanId: "string",
        },
        instanceId: "string",
        displayName: "string",
        nicIndex: 0,
    });
    
    type: oci:Core:VnicAttachment
    properties:
        createVnicDetails:
            assignIpv6ip: false
            assignPrivateDnsRecord: false
            assignPublicIp: string
            definedTags:
                string: string
            displayName: string
            freeformTags:
                string: string
            hostnameLabel: string
            ipv6addressIpv6subnetCidrPairDetails:
                - ipv6Address: string
                  ipv6SubnetCidr: string
            nsgIds:
                - string
            privateIp: string
            securityAttributes:
                string: string
            skipSourceDestCheck: false
            subnetId: string
            vlanId: string
        displayName: string
        instanceId: string
        nicIndex: 0
    

    VnicAttachment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The VnicAttachment resource accepts the following input properties:

    CreateVnicDetails VnicAttachmentCreateVnicDetails
    (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see Virtual Network Interface Cards (VNICs).
    InstanceId string
    The OCID of the instance.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    NicIndex int

    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

    ** 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

    CreateVnicDetails VnicAttachmentCreateVnicDetailsArgs
    (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see Virtual Network Interface Cards (VNICs).
    InstanceId string
    The OCID of the instance.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    NicIndex int

    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

    ** 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

    createVnicDetails VnicAttachmentCreateVnicDetails
    (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see Virtual Network Interface Cards (VNICs).
    instanceId String
    The OCID of the instance.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    nicIndex Integer

    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

    ** 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

    createVnicDetails VnicAttachmentCreateVnicDetails
    (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see Virtual Network Interface Cards (VNICs).
    instanceId string
    The OCID of the instance.
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    nicIndex number

    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

    ** 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

    create_vnic_details core.VnicAttachmentCreateVnicDetailsArgs
    (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see Virtual Network Interface Cards (VNICs).
    instance_id str
    The OCID of the instance.
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    nic_index int

    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

    ** 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

    createVnicDetails Property Map
    (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see Virtual Network Interface Cards (VNICs).
    instanceId String
    The OCID of the instance.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    nicIndex Number

    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

    ** 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

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VnicAttachment resource produces the following output properties:

    AvailabilityDomain string
    The availability domain of the instance. Example: Uocm:PHX-AD-1
    CompartmentId string
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current state of the VNIC attachment.
    SubnetId string
    The OCID of the subnet to create the VNIC in.
    TimeCreated string
    The date and time the VNIC attachment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VlanId string
    The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.
    VlanTag int
    The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
    VnicId string
    The OCID of the VNIC. Available after the attachment process is complete.
    AvailabilityDomain string
    The availability domain of the instance. Example: Uocm:PHX-AD-1
    CompartmentId string
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current state of the VNIC attachment.
    SubnetId string
    The OCID of the subnet to create the VNIC in.
    TimeCreated string
    The date and time the VNIC attachment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VlanId string
    The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.
    VlanTag int
    The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
    VnicId string
    The OCID of the VNIC. Available after the attachment process is complete.
    availabilityDomain String
    The availability domain of the instance. Example: Uocm:PHX-AD-1
    compartmentId String
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current state of the VNIC attachment.
    subnetId String
    The OCID of the subnet to create the VNIC in.
    timeCreated String
    The date and time the VNIC attachment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlanId String
    The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.
    vlanTag Integer
    The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
    vnicId String
    The OCID of the VNIC. Available after the attachment process is complete.
    availabilityDomain string
    The availability domain of the instance. Example: Uocm:PHX-AD-1
    compartmentId string
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The current state of the VNIC attachment.
    subnetId string
    The OCID of the subnet to create the VNIC in.
    timeCreated string
    The date and time the VNIC attachment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlanId string
    The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.
    vlanTag number
    The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
    vnicId string
    The OCID of the VNIC. Available after the attachment process is complete.
    availability_domain str
    The availability domain of the instance. Example: Uocm:PHX-AD-1
    compartment_id str
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The current state of the VNIC attachment.
    subnet_id str
    The OCID of the subnet to create the VNIC in.
    time_created str
    The date and time the VNIC attachment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlan_id str
    The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.
    vlan_tag int
    The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
    vnic_id str
    The OCID of the VNIC. Available after the attachment process is complete.
    availabilityDomain String
    The availability domain of the instance. Example: Uocm:PHX-AD-1
    compartmentId String
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current state of the VNIC attachment.
    subnetId String
    The OCID of the subnet to create the VNIC in.
    timeCreated String
    The date and time the VNIC attachment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlanId String
    The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.
    vlanTag Number
    The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
    vnicId String
    The OCID of the VNIC. Available after the attachment process is complete.

    Look up Existing VnicAttachment Resource

    Get an existing VnicAttachment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VnicAttachmentState, opts?: CustomResourceOptions): VnicAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            availability_domain: Optional[str] = None,
            compartment_id: Optional[str] = None,
            create_vnic_details: Optional[_core.VnicAttachmentCreateVnicDetailsArgs] = None,
            display_name: Optional[str] = None,
            instance_id: Optional[str] = None,
            nic_index: Optional[int] = None,
            state: Optional[str] = None,
            subnet_id: Optional[str] = None,
            time_created: Optional[str] = None,
            vlan_id: Optional[str] = None,
            vlan_tag: Optional[int] = None,
            vnic_id: Optional[str] = None) -> VnicAttachment
    func GetVnicAttachment(ctx *Context, name string, id IDInput, state *VnicAttachmentState, opts ...ResourceOption) (*VnicAttachment, error)
    public static VnicAttachment Get(string name, Input<string> id, VnicAttachmentState? state, CustomResourceOptions? opts = null)
    public static VnicAttachment get(String name, Output<String> id, VnicAttachmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AvailabilityDomain string
    The availability domain of the instance. Example: Uocm:PHX-AD-1
    CompartmentId string
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
    CreateVnicDetails VnicAttachmentCreateVnicDetails
    (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see Virtual Network Interface Cards (VNICs).
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    InstanceId string
    The OCID of the instance.
    NicIndex int

    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

    ** 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

    State string
    The current state of the VNIC attachment.
    SubnetId string
    The OCID of the subnet to create the VNIC in.
    TimeCreated string
    The date and time the VNIC attachment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VlanId string
    The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.
    VlanTag int
    The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
    VnicId string
    The OCID of the VNIC. Available after the attachment process is complete.
    AvailabilityDomain string
    The availability domain of the instance. Example: Uocm:PHX-AD-1
    CompartmentId string
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
    CreateVnicDetails VnicAttachmentCreateVnicDetailsArgs
    (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see Virtual Network Interface Cards (VNICs).
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    InstanceId string
    The OCID of the instance.
    NicIndex int

    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

    ** 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

    State string
    The current state of the VNIC attachment.
    SubnetId string
    The OCID of the subnet to create the VNIC in.
    TimeCreated string
    The date and time the VNIC attachment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VlanId string
    The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.
    VlanTag int
    The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
    VnicId string
    The OCID of the VNIC. Available after the attachment process is complete.
    availabilityDomain String
    The availability domain of the instance. Example: Uocm:PHX-AD-1
    compartmentId String
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
    createVnicDetails VnicAttachmentCreateVnicDetails
    (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see Virtual Network Interface Cards (VNICs).
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    instanceId String
    The OCID of the instance.
    nicIndex Integer

    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

    ** 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

    state String
    The current state of the VNIC attachment.
    subnetId String
    The OCID of the subnet to create the VNIC in.
    timeCreated String
    The date and time the VNIC attachment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlanId String
    The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.
    vlanTag Integer
    The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
    vnicId String
    The OCID of the VNIC. Available after the attachment process is complete.
    availabilityDomain string
    The availability domain of the instance. Example: Uocm:PHX-AD-1
    compartmentId string
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
    createVnicDetails VnicAttachmentCreateVnicDetails
    (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see Virtual Network Interface Cards (VNICs).
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    instanceId string
    The OCID of the instance.
    nicIndex number

    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

    ** 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

    state string
    The current state of the VNIC attachment.
    subnetId string
    The OCID of the subnet to create the VNIC in.
    timeCreated string
    The date and time the VNIC attachment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlanId string
    The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.
    vlanTag number
    The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
    vnicId string
    The OCID of the VNIC. Available after the attachment process is complete.
    availability_domain str
    The availability domain of the instance. Example: Uocm:PHX-AD-1
    compartment_id str
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
    create_vnic_details core.VnicAttachmentCreateVnicDetailsArgs
    (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see Virtual Network Interface Cards (VNICs).
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    instance_id str
    The OCID of the instance.
    nic_index int

    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

    ** 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

    state str
    The current state of the VNIC attachment.
    subnet_id str
    The OCID of the subnet to create the VNIC in.
    time_created str
    The date and time the VNIC attachment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlan_id str
    The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.
    vlan_tag int
    The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
    vnic_id str
    The OCID of the VNIC. Available after the attachment process is complete.
    availabilityDomain String
    The availability domain of the instance. Example: Uocm:PHX-AD-1
    compartmentId String
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
    createVnicDetails Property Map
    (Updatable) Contains properties for a VNIC. You use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC. For more information about VNICs, see Virtual Network Interface Cards (VNICs).
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    instanceId String
    The OCID of the instance.
    nicIndex Number

    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

    ** 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

    state String
    The current state of the VNIC attachment.
    subnetId String
    The OCID of the subnet to create the VNIC in.
    timeCreated String
    The date and time the VNIC attachment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlanId String
    The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.
    vlanTag Number
    The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
    vnicId String
    The OCID of the VNIC. Available after the attachment process is complete.

    Supporting Types

    VnicAttachmentCreateVnicDetails, VnicAttachmentCreateVnicDetailsArgs

    AssignIpv6ip bool
    Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (ipv6SubnetCidr) of your choice to assign the IPv6 address from. If ipv6SubnetCidr is not provided then an IPv6 prefix is chosen for you.
    AssignPrivateDnsRecord bool

    Whether the VNIC should be assigned a DNS record. If set to false, no DNS record registion for the VNIC; if set to true, DNS record will be registered. Example: true

    If you specify a hostnameLabel, the assignPrivateDnsRecord is require to be set to true.

    AssignPublicIp string

    Whether the VNIC should be assigned a public IP address. Defaults to whether the subnet is public or private. If not set and the VNIC is being created in a private subnet (that is, where prohibitPublicIpOnVnic = true in the Subnet), then no public IP address is assigned. If not set and the subnet is public (prohibitPublicIpOnVnic = false), then a public IP address is assigned. If set to true and prohibitPublicIpOnVnic = true, an error is returned.

    Note: This public IP address is associated with the primary private IP on the VNIC. For more information, see IP Addresses.

    Note: There's a limit to the number of public IPs a VNIC or instance can have. If you try to create a secondary VNIC with an assigned public IP for an instance that has already reached its public IP limit, an error is returned. For information about the public IP limits, see Public IP Addresses.

    Example: false

    If you specify a vlanId, then assignPublicIp must be set to false. See Vlan.

    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags Dictionary<string, string>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    HostnameLabel string

    (Updatable) The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) (for example, bminstance1 in FQDN bminstance1.subnet123.vcn1.oraclevcn.com). Must be unique across all VNICs in the subnet and comply with RFC 952 and RFC 1123. The value appears in the [Vnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/) object and also the [PrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/) object returned by [ListPrivateIps](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/ListPrivateIps) and [GetPrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/GetPrivateIp).

    For more information, see DNS in Your Virtual Cloud Network.

    When launching an instance, use this hostnameLabel instead of the deprecated hostnameLabel in [LaunchInstanceDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/requests/LaunchInstanceDetails). If you provide both, the values must match.

    Example: bminstance1

    If you specify a vlanId, the hostnameLabel cannot be specified. VNICs on a VLAN can not be assigned a hostname. See Vlan.

    Ipv6addressIpv6subnetCidrPairDetails List<VnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetail>
    A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges from which Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range.
    NsgIds List<string>

    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. For more information about NSGs, see NetworkSecurityGroup.

    If a vlanId is specified, the nsgIds cannot be specified. The vlanId indicates that the VNIC will belong to a VLAN instead of a subnet. With VLANs, all VNICs in the VLAN belong to the NSGs that are associated with the VLAN. See Vlan.

    PrivateIp string

    A private IP address of your choice to assign to the VNIC. Must be an available IP address within the subnet's CIDR. If you don't specify a value, Oracle automatically assigns a private IP address from the subnet. This is the VNIC's primary private IP address. The value appears in the [Vnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/) object and also the [PrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/) object returned by [ListPrivateIps](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/ListPrivateIps) and [GetPrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/GetPrivateIp).

    If you specify a vlanId, the privateIp cannot be specified. See Vlan.

    Example: 10.0.3.3

    SecurityAttributes Dictionary<string, string>
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    SkipSourceDestCheck bool

    (Updatable) Whether the source/destination check is disabled on the VNIC. Defaults to false, which means the check is performed. For information about why you would skip the source/destination check, see Using a Private IP as a Route Target.

    If you specify a vlanId, the skipSourceDestCheck cannot be specified because the source/destination check is always disabled for VNICs in a VLAN. See Vlan.

    Example: true

    SubnetId string

    The OCID of the subnet to create the VNIC in. When launching an instance, use this subnetId instead of the deprecated subnetId in LaunchInstanceDetails. At least one of them is required; if you provide both, the values must match.

    If you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN instead of a subnet, provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.

    VlanId string

    Provide this attribute only if you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN. The value is the OCID of the VLAN. See Vlan.

    Provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.

    AssignIpv6ip bool
    Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (ipv6SubnetCidr) of your choice to assign the IPv6 address from. If ipv6SubnetCidr is not provided then an IPv6 prefix is chosen for you.
    AssignPrivateDnsRecord bool

    Whether the VNIC should be assigned a DNS record. If set to false, no DNS record registion for the VNIC; if set to true, DNS record will be registered. Example: true

    If you specify a hostnameLabel, the assignPrivateDnsRecord is require to be set to true.

    AssignPublicIp string

    Whether the VNIC should be assigned a public IP address. Defaults to whether the subnet is public or private. If not set and the VNIC is being created in a private subnet (that is, where prohibitPublicIpOnVnic = true in the Subnet), then no public IP address is assigned. If not set and the subnet is public (prohibitPublicIpOnVnic = false), then a public IP address is assigned. If set to true and prohibitPublicIpOnVnic = true, an error is returned.

    Note: This public IP address is associated with the primary private IP on the VNIC. For more information, see IP Addresses.

    Note: There's a limit to the number of public IPs a VNIC or instance can have. If you try to create a secondary VNIC with an assigned public IP for an instance that has already reached its public IP limit, an error is returned. For information about the public IP limits, see Public IP Addresses.

    Example: false

    If you specify a vlanId, then assignPublicIp must be set to false. See Vlan.

    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags map[string]string
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    HostnameLabel string

    (Updatable) The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) (for example, bminstance1 in FQDN bminstance1.subnet123.vcn1.oraclevcn.com). Must be unique across all VNICs in the subnet and comply with RFC 952 and RFC 1123. The value appears in the [Vnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/) object and also the [PrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/) object returned by [ListPrivateIps](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/ListPrivateIps) and [GetPrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/GetPrivateIp).

    For more information, see DNS in Your Virtual Cloud Network.

    When launching an instance, use this hostnameLabel instead of the deprecated hostnameLabel in [LaunchInstanceDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/requests/LaunchInstanceDetails). If you provide both, the values must match.

    Example: bminstance1

    If you specify a vlanId, the hostnameLabel cannot be specified. VNICs on a VLAN can not be assigned a hostname. See Vlan.

    Ipv6addressIpv6subnetCidrPairDetails []VnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetail
    A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges from which Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range.
    NsgIds []string

    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. For more information about NSGs, see NetworkSecurityGroup.

    If a vlanId is specified, the nsgIds cannot be specified. The vlanId indicates that the VNIC will belong to a VLAN instead of a subnet. With VLANs, all VNICs in the VLAN belong to the NSGs that are associated with the VLAN. See Vlan.

    PrivateIp string

    A private IP address of your choice to assign to the VNIC. Must be an available IP address within the subnet's CIDR. If you don't specify a value, Oracle automatically assigns a private IP address from the subnet. This is the VNIC's primary private IP address. The value appears in the [Vnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/) object and also the [PrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/) object returned by [ListPrivateIps](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/ListPrivateIps) and [GetPrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/GetPrivateIp).

    If you specify a vlanId, the privateIp cannot be specified. See Vlan.

    Example: 10.0.3.3

    SecurityAttributes map[string]string
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    SkipSourceDestCheck bool

    (Updatable) Whether the source/destination check is disabled on the VNIC. Defaults to false, which means the check is performed. For information about why you would skip the source/destination check, see Using a Private IP as a Route Target.

    If you specify a vlanId, the skipSourceDestCheck cannot be specified because the source/destination check is always disabled for VNICs in a VLAN. See Vlan.

    Example: true

    SubnetId string

    The OCID of the subnet to create the VNIC in. When launching an instance, use this subnetId instead of the deprecated subnetId in LaunchInstanceDetails. At least one of them is required; if you provide both, the values must match.

    If you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN instead of a subnet, provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.

    VlanId string

    Provide this attribute only if you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN. The value is the OCID of the VLAN. See Vlan.

    Provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.

    assignIpv6ip Boolean
    Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (ipv6SubnetCidr) of your choice to assign the IPv6 address from. If ipv6SubnetCidr is not provided then an IPv6 prefix is chosen for you.
    assignPrivateDnsRecord Boolean

    Whether the VNIC should be assigned a DNS record. If set to false, no DNS record registion for the VNIC; if set to true, DNS record will be registered. Example: true

    If you specify a hostnameLabel, the assignPrivateDnsRecord is require to be set to true.

    assignPublicIp String

    Whether the VNIC should be assigned a public IP address. Defaults to whether the subnet is public or private. If not set and the VNIC is being created in a private subnet (that is, where prohibitPublicIpOnVnic = true in the Subnet), then no public IP address is assigned. If not set and the subnet is public (prohibitPublicIpOnVnic = false), then a public IP address is assigned. If set to true and prohibitPublicIpOnVnic = true, an error is returned.

    Note: This public IP address is associated with the primary private IP on the VNIC. For more information, see IP Addresses.

    Note: There's a limit to the number of public IPs a VNIC or instance can have. If you try to create a secondary VNIC with an assigned public IP for an instance that has already reached its public IP limit, an error is returned. For information about the public IP limits, see Public IP Addresses.

    Example: false

    If you specify a vlanId, then assignPublicIp must be set to false. See Vlan.

    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<String,String>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    hostnameLabel String

    (Updatable) The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) (for example, bminstance1 in FQDN bminstance1.subnet123.vcn1.oraclevcn.com). Must be unique across all VNICs in the subnet and comply with RFC 952 and RFC 1123. The value appears in the [Vnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/) object and also the [PrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/) object returned by [ListPrivateIps](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/ListPrivateIps) and [GetPrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/GetPrivateIp).

    For more information, see DNS in Your Virtual Cloud Network.

    When launching an instance, use this hostnameLabel instead of the deprecated hostnameLabel in [LaunchInstanceDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/requests/LaunchInstanceDetails). If you provide both, the values must match.

    Example: bminstance1

    If you specify a vlanId, the hostnameLabel cannot be specified. VNICs on a VLAN can not be assigned a hostname. See Vlan.

    ipv6addressIpv6subnetCidrPairDetails List<VnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetail>
    A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges from which Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range.
    nsgIds List<String>

    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. For more information about NSGs, see NetworkSecurityGroup.

    If a vlanId is specified, the nsgIds cannot be specified. The vlanId indicates that the VNIC will belong to a VLAN instead of a subnet. With VLANs, all VNICs in the VLAN belong to the NSGs that are associated with the VLAN. See Vlan.

    privateIp String

    A private IP address of your choice to assign to the VNIC. Must be an available IP address within the subnet's CIDR. If you don't specify a value, Oracle automatically assigns a private IP address from the subnet. This is the VNIC's primary private IP address. The value appears in the [Vnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/) object and also the [PrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/) object returned by [ListPrivateIps](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/ListPrivateIps) and [GetPrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/GetPrivateIp).

    If you specify a vlanId, the privateIp cannot be specified. See Vlan.

    Example: 10.0.3.3

    securityAttributes Map<String,String>
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    skipSourceDestCheck Boolean

    (Updatable) Whether the source/destination check is disabled on the VNIC. Defaults to false, which means the check is performed. For information about why you would skip the source/destination check, see Using a Private IP as a Route Target.

    If you specify a vlanId, the skipSourceDestCheck cannot be specified because the source/destination check is always disabled for VNICs in a VLAN. See Vlan.

    Example: true

    subnetId String

    The OCID of the subnet to create the VNIC in. When launching an instance, use this subnetId instead of the deprecated subnetId in LaunchInstanceDetails. At least one of them is required; if you provide both, the values must match.

    If you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN instead of a subnet, provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.

    vlanId String

    Provide this attribute only if you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN. The value is the OCID of the VLAN. See Vlan.

    Provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.

    assignIpv6ip boolean
    Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (ipv6SubnetCidr) of your choice to assign the IPv6 address from. If ipv6SubnetCidr is not provided then an IPv6 prefix is chosen for you.
    assignPrivateDnsRecord boolean

    Whether the VNIC should be assigned a DNS record. If set to false, no DNS record registion for the VNIC; if set to true, DNS record will be registered. Example: true

    If you specify a hostnameLabel, the assignPrivateDnsRecord is require to be set to true.

    assignPublicIp string

    Whether the VNIC should be assigned a public IP address. Defaults to whether the subnet is public or private. If not set and the VNIC is being created in a private subnet (that is, where prohibitPublicIpOnVnic = true in the Subnet), then no public IP address is assigned. If not set and the subnet is public (prohibitPublicIpOnVnic = false), then a public IP address is assigned. If set to true and prohibitPublicIpOnVnic = true, an error is returned.

    Note: This public IP address is associated with the primary private IP on the VNIC. For more information, see IP Addresses.

    Note: There's a limit to the number of public IPs a VNIC or instance can have. If you try to create a secondary VNIC with an assigned public IP for an instance that has already reached its public IP limit, an error is returned. For information about the public IP limits, see Public IP Addresses.

    Example: false

    If you specify a vlanId, then assignPublicIp must be set to false. See Vlan.

    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags {[key: string]: string}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    hostnameLabel string

    (Updatable) The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) (for example, bminstance1 in FQDN bminstance1.subnet123.vcn1.oraclevcn.com). Must be unique across all VNICs in the subnet and comply with RFC 952 and RFC 1123. The value appears in the [Vnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/) object and also the [PrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/) object returned by [ListPrivateIps](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/ListPrivateIps) and [GetPrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/GetPrivateIp).

    For more information, see DNS in Your Virtual Cloud Network.

    When launching an instance, use this hostnameLabel instead of the deprecated hostnameLabel in [LaunchInstanceDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/requests/LaunchInstanceDetails). If you provide both, the values must match.

    Example: bminstance1

    If you specify a vlanId, the hostnameLabel cannot be specified. VNICs on a VLAN can not be assigned a hostname. See Vlan.

    ipv6addressIpv6subnetCidrPairDetails VnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetail[]
    A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges from which Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range.
    nsgIds string[]

    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. For more information about NSGs, see NetworkSecurityGroup.

    If a vlanId is specified, the nsgIds cannot be specified. The vlanId indicates that the VNIC will belong to a VLAN instead of a subnet. With VLANs, all VNICs in the VLAN belong to the NSGs that are associated with the VLAN. See Vlan.

    privateIp string

    A private IP address of your choice to assign to the VNIC. Must be an available IP address within the subnet's CIDR. If you don't specify a value, Oracle automatically assigns a private IP address from the subnet. This is the VNIC's primary private IP address. The value appears in the [Vnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/) object and also the [PrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/) object returned by [ListPrivateIps](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/ListPrivateIps) and [GetPrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/GetPrivateIp).

    If you specify a vlanId, the privateIp cannot be specified. See Vlan.

    Example: 10.0.3.3

    securityAttributes {[key: string]: string}
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    skipSourceDestCheck boolean

    (Updatable) Whether the source/destination check is disabled on the VNIC. Defaults to false, which means the check is performed. For information about why you would skip the source/destination check, see Using a Private IP as a Route Target.

    If you specify a vlanId, the skipSourceDestCheck cannot be specified because the source/destination check is always disabled for VNICs in a VLAN. See Vlan.

    Example: true

    subnetId string

    The OCID of the subnet to create the VNIC in. When launching an instance, use this subnetId instead of the deprecated subnetId in LaunchInstanceDetails. At least one of them is required; if you provide both, the values must match.

    If you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN instead of a subnet, provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.

    vlanId string

    Provide this attribute only if you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN. The value is the OCID of the VLAN. See Vlan.

    Provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.

    assign_ipv6ip bool
    Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (ipv6SubnetCidr) of your choice to assign the IPv6 address from. If ipv6SubnetCidr is not provided then an IPv6 prefix is chosen for you.
    assign_private_dns_record bool

    Whether the VNIC should be assigned a DNS record. If set to false, no DNS record registion for the VNIC; if set to true, DNS record will be registered. Example: true

    If you specify a hostnameLabel, the assignPrivateDnsRecord is require to be set to true.

    assign_public_ip str

    Whether the VNIC should be assigned a public IP address. Defaults to whether the subnet is public or private. If not set and the VNIC is being created in a private subnet (that is, where prohibitPublicIpOnVnic = true in the Subnet), then no public IP address is assigned. If not set and the subnet is public (prohibitPublicIpOnVnic = false), then a public IP address is assigned. If set to true and prohibitPublicIpOnVnic = true, an error is returned.

    Note: This public IP address is associated with the primary private IP on the VNIC. For more information, see IP Addresses.

    Note: There's a limit to the number of public IPs a VNIC or instance can have. If you try to create a secondary VNIC with an assigned public IP for an instance that has already reached its public IP limit, an error is returned. For information about the public IP limits, see Public IP Addresses.

    Example: false

    If you specify a vlanId, then assignPublicIp must be set to false. See Vlan.

    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeform_tags Mapping[str, str]
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    hostname_label str

    (Updatable) The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) (for example, bminstance1 in FQDN bminstance1.subnet123.vcn1.oraclevcn.com). Must be unique across all VNICs in the subnet and comply with RFC 952 and RFC 1123. The value appears in the [Vnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/) object and also the [PrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/) object returned by [ListPrivateIps](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/ListPrivateIps) and [GetPrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/GetPrivateIp).

    For more information, see DNS in Your Virtual Cloud Network.

    When launching an instance, use this hostnameLabel instead of the deprecated hostnameLabel in [LaunchInstanceDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/requests/LaunchInstanceDetails). If you provide both, the values must match.

    Example: bminstance1

    If you specify a vlanId, the hostnameLabel cannot be specified. VNICs on a VLAN can not be assigned a hostname. See Vlan.

    ipv6address_ipv6subnet_cidr_pair_details Sequence[core.VnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetail]
    A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges from which Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range.
    nsg_ids Sequence[str]

    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. For more information about NSGs, see NetworkSecurityGroup.

    If a vlanId is specified, the nsgIds cannot be specified. The vlanId indicates that the VNIC will belong to a VLAN instead of a subnet. With VLANs, all VNICs in the VLAN belong to the NSGs that are associated with the VLAN. See Vlan.

    private_ip str

    A private IP address of your choice to assign to the VNIC. Must be an available IP address within the subnet's CIDR. If you don't specify a value, Oracle automatically assigns a private IP address from the subnet. This is the VNIC's primary private IP address. The value appears in the [Vnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/) object and also the [PrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/) object returned by [ListPrivateIps](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/ListPrivateIps) and [GetPrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/GetPrivateIp).

    If you specify a vlanId, the privateIp cannot be specified. See Vlan.

    Example: 10.0.3.3

    security_attributes Mapping[str, str]
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    skip_source_dest_check bool

    (Updatable) Whether the source/destination check is disabled on the VNIC. Defaults to false, which means the check is performed. For information about why you would skip the source/destination check, see Using a Private IP as a Route Target.

    If you specify a vlanId, the skipSourceDestCheck cannot be specified because the source/destination check is always disabled for VNICs in a VLAN. See Vlan.

    Example: true

    subnet_id str

    The OCID of the subnet to create the VNIC in. When launching an instance, use this subnetId instead of the deprecated subnetId in LaunchInstanceDetails. At least one of them is required; if you provide both, the values must match.

    If you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN instead of a subnet, provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.

    vlan_id str

    Provide this attribute only if you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN. The value is the OCID of the VLAN. See Vlan.

    Provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.

    assignIpv6ip Boolean
    Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (ipv6SubnetCidr) of your choice to assign the IPv6 address from. If ipv6SubnetCidr is not provided then an IPv6 prefix is chosen for you.
    assignPrivateDnsRecord Boolean

    Whether the VNIC should be assigned a DNS record. If set to false, no DNS record registion for the VNIC; if set to true, DNS record will be registered. Example: true

    If you specify a hostnameLabel, the assignPrivateDnsRecord is require to be set to true.

    assignPublicIp String

    Whether the VNIC should be assigned a public IP address. Defaults to whether the subnet is public or private. If not set and the VNIC is being created in a private subnet (that is, where prohibitPublicIpOnVnic = true in the Subnet), then no public IP address is assigned. If not set and the subnet is public (prohibitPublicIpOnVnic = false), then a public IP address is assigned. If set to true and prohibitPublicIpOnVnic = true, an error is returned.

    Note: This public IP address is associated with the primary private IP on the VNIC. For more information, see IP Addresses.

    Note: There's a limit to the number of public IPs a VNIC or instance can have. If you try to create a secondary VNIC with an assigned public IP for an instance that has already reached its public IP limit, an error is returned. For information about the public IP limits, see Public IP Addresses.

    Example: false

    If you specify a vlanId, then assignPublicIp must be set to false. See Vlan.

    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<String>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    hostnameLabel String

    (Updatable) The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) (for example, bminstance1 in FQDN bminstance1.subnet123.vcn1.oraclevcn.com). Must be unique across all VNICs in the subnet and comply with RFC 952 and RFC 1123. The value appears in the [Vnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/) object and also the [PrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/) object returned by [ListPrivateIps](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/ListPrivateIps) and [GetPrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/GetPrivateIp).

    For more information, see DNS in Your Virtual Cloud Network.

    When launching an instance, use this hostnameLabel instead of the deprecated hostnameLabel in [LaunchInstanceDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/requests/LaunchInstanceDetails). If you provide both, the values must match.

    Example: bminstance1

    If you specify a vlanId, the hostnameLabel cannot be specified. VNICs on a VLAN can not be assigned a hostname. See Vlan.

    ipv6addressIpv6subnetCidrPairDetails List<Property Map>
    A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges from which Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range.
    nsgIds List<String>

    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. For more information about NSGs, see NetworkSecurityGroup.

    If a vlanId is specified, the nsgIds cannot be specified. The vlanId indicates that the VNIC will belong to a VLAN instead of a subnet. With VLANs, all VNICs in the VLAN belong to the NSGs that are associated with the VLAN. See Vlan.

    privateIp String

    A private IP address of your choice to assign to the VNIC. Must be an available IP address within the subnet's CIDR. If you don't specify a value, Oracle automatically assigns a private IP address from the subnet. This is the VNIC's primary private IP address. The value appears in the [Vnic](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Vnic/) object and also the [PrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/) object returned by [ListPrivateIps](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/ListPrivateIps) and [GetPrivateIp](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PrivateIp/GetPrivateIp).

    If you specify a vlanId, the privateIp cannot be specified. See Vlan.

    Example: 10.0.3.3

    securityAttributes Map<String>
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    skipSourceDestCheck Boolean

    (Updatable) Whether the source/destination check is disabled on the VNIC. Defaults to false, which means the check is performed. For information about why you would skip the source/destination check, see Using a Private IP as a Route Target.

    If you specify a vlanId, the skipSourceDestCheck cannot be specified because the source/destination check is always disabled for VNICs in a VLAN. See Vlan.

    Example: true

    subnetId String

    The OCID of the subnet to create the VNIC in. When launching an instance, use this subnetId instead of the deprecated subnetId in LaunchInstanceDetails. At least one of them is required; if you provide both, the values must match.

    If you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN instead of a subnet, provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.

    vlanId String

    Provide this attribute only if you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN. The value is the OCID of the VLAN. See Vlan.

    Provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.

    VnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetail, VnicAttachmentCreateVnicDetailsIpv6addressIpv6subnetCidrPairDetailArgs

    Import

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

    $ pulumi import oci:Core/vnicAttachment:VnicAttachment test_vnic_attachment "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi