1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. Eni
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.Eni

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

    Provides a resource to create an ENI.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const zones = tencentcloud.getAvailabilityZonesByProduct({
        product: "vpc",
    });
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    const subnet = new tencentcloud.Subnet("subnet", {
        availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
        vpcId: vpc.vpcId,
        cidrBlock: "10.0.0.0/16",
        isMulticast: false,
    });
    const example1 = new tencentcloud.SecurityGroup("example1", {
        description: "sg desc.",
        projectId: 0,
        tags: {
            example: "test",
        },
    });
    const example2 = new tencentcloud.SecurityGroup("example2", {
        description: "sg desc.",
        projectId: 0,
        tags: {
            example: "test",
        },
    });
    const example = new tencentcloud.Eni("example", {
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        description: "eni desc.",
        ipv4Count: 1,
        securityGroups: [
            example1.securityGroupId,
            example2.securityGroupId,
        ],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    zones = tencentcloud.get_availability_zones_by_product(product="vpc")
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    subnet = tencentcloud.Subnet("subnet",
        availability_zone=zones.zones[0].name,
        vpc_id=vpc.vpc_id,
        cidr_block="10.0.0.0/16",
        is_multicast=False)
    example1 = tencentcloud.SecurityGroup("example1",
        description="sg desc.",
        project_id=0,
        tags={
            "example": "test",
        })
    example2 = tencentcloud.SecurityGroup("example2",
        description="sg desc.",
        project_id=0,
        tags={
            "example": "test",
        })
    example = tencentcloud.Eni("example",
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        description="eni desc.",
        ipv4_count=1,
        security_groups=[
            example1.security_group_id,
            example2.security_group_id,
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		zones, err := tencentcloud.GetAvailabilityZonesByProduct(ctx, &tencentcloud.GetAvailabilityZonesByProductArgs{
    			Product: "vpc",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
    			AvailabilityZone: pulumi.String(zones.Zones[0].Name),
    			VpcId:            vpc.VpcId,
    			CidrBlock:        pulumi.String("10.0.0.0/16"),
    			IsMulticast:      pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		example1, err := tencentcloud.NewSecurityGroup(ctx, "example1", &tencentcloud.SecurityGroupArgs{
    			Description: pulumi.String("sg desc."),
    			ProjectId:   pulumi.Float64(0),
    			Tags: pulumi.StringMap{
    				"example": pulumi.String("test"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		example2, err := tencentcloud.NewSecurityGroup(ctx, "example2", &tencentcloud.SecurityGroupArgs{
    			Description: pulumi.String("sg desc."),
    			ProjectId:   pulumi.Float64(0),
    			Tags: pulumi.StringMap{
    				"example": pulumi.String("test"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewEni(ctx, "example", &tencentcloud.EniArgs{
    			VpcId:       vpc.VpcId,
    			SubnetId:    subnet.SubnetId,
    			Description: pulumi.String("eni desc."),
    			Ipv4Count:   pulumi.Float64(1),
    			SecurityGroups: pulumi.StringArray{
    				example1.SecurityGroupId,
    				example2.SecurityGroupId,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var zones = Tencentcloud.GetAvailabilityZonesByProduct.Invoke(new()
        {
            Product = "vpc",
        });
    
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
            VpcId = vpc.VpcId,
            CidrBlock = "10.0.0.0/16",
            IsMulticast = false,
        });
    
        var example1 = new Tencentcloud.SecurityGroup("example1", new()
        {
            Description = "sg desc.",
            ProjectId = 0,
            Tags = 
            {
                { "example", "test" },
            },
        });
    
        var example2 = new Tencentcloud.SecurityGroup("example2", new()
        {
            Description = "sg desc.",
            ProjectId = 0,
            Tags = 
            {
                { "example", "test" },
            },
        });
    
        var example = new Tencentcloud.Eni("example", new()
        {
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            Description = "eni desc.",
            Ipv4Count = 1,
            SecurityGroups = new[]
            {
                example1.SecurityGroupId,
                example2.SecurityGroupId,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetAvailabilityZonesByProductArgs;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Subnet;
    import com.pulumi.tencentcloud.SubnetArgs;
    import com.pulumi.tencentcloud.SecurityGroup;
    import com.pulumi.tencentcloud.SecurityGroupArgs;
    import com.pulumi.tencentcloud.Eni;
    import com.pulumi.tencentcloud.EniArgs;
    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) {
            final var zones = TencentcloudFunctions.getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs.builder()
                .product("vpc")
                .build());
    
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[0].name()))
                .vpcId(vpc.vpcId())
                .cidrBlock("10.0.0.0/16")
                .isMulticast(false)
                .build());
    
            var example1 = new SecurityGroup("example1", SecurityGroupArgs.builder()
                .description("sg desc.")
                .projectId(0)
                .tags(Map.of("example", "test"))
                .build());
    
            var example2 = new SecurityGroup("example2", SecurityGroupArgs.builder()
                .description("sg desc.")
                .projectId(0)
                .tags(Map.of("example", "test"))
                .build());
    
            var example = new Eni("example", EniArgs.builder()
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .description("eni desc.")
                .ipv4Count(1)
                .securityGroups(            
                    example1.securityGroupId(),
                    example2.securityGroupId())
                .build());
    
        }
    }
    
    resources:
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
      subnet:
        type: tencentcloud:Subnet
        properties:
          availabilityZone: ${zones.zones[0].name}
          vpcId: ${vpc.vpcId}
          cidrBlock: 10.0.0.0/16
          isMulticast: false
      example1:
        type: tencentcloud:SecurityGroup
        properties:
          description: sg desc.
          projectId: 0
          tags:
            example: test
      example2:
        type: tencentcloud:SecurityGroup
        properties:
          description: sg desc.
          projectId: 0
          tags:
            example: test
      example:
        type: tencentcloud:Eni
        properties:
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
          description: eni desc.
          ipv4Count: 1
          securityGroups:
            - ${example1.securityGroupId}
            - ${example2.securityGroupId}
    variables:
      zones:
        fn::invoke:
          function: tencentcloud:getAvailabilityZonesByProduct
          arguments:
            product: vpc
    

    Create Eni Resource

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

    Constructor syntax

    new Eni(name: string, args: EniArgs, opts?: CustomResourceOptions);
    @overload
    def Eni(resource_name: str,
            args: EniArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Eni(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            subnet_id: Optional[str] = None,
            vpc_id: Optional[str] = None,
            description: Optional[str] = None,
            eni_id: Optional[str] = None,
            ipv4_count: Optional[float] = None,
            ipv4s: Optional[Sequence[EniIpv4Args]] = None,
            name: Optional[str] = None,
            security_groups: Optional[Sequence[str]] = None,
            tags: Optional[Mapping[str, str]] = None)
    func NewEni(ctx *Context, name string, args EniArgs, opts ...ResourceOption) (*Eni, error)
    public Eni(string name, EniArgs args, CustomResourceOptions? opts = null)
    public Eni(String name, EniArgs args)
    public Eni(String name, EniArgs args, CustomResourceOptions options)
    
    type: tencentcloud:Eni
    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 EniArgs
    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 EniArgs
    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 EniArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EniArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EniArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Eni 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 Eni resource accepts the following input properties:

    SubnetId string
    ID of the subnet within this vpc.
    VpcId string
    ID of the vpc.
    Description string
    Description of the ENI, maximum length 60.
    EniId string
    ID of the resource.
    Ipv4Count double
    The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with ipv4s.
    Ipv4s List<EniIpv4>
    Applying for intranet IPv4s collection, conflict with ipv4_count. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
    Name string
    Name of the ENI, maximum length 60.
    SecurityGroups List<string>
    A set of security group IDs.
    Tags Dictionary<string, string>
    Tags of the ENI.
    SubnetId string
    ID of the subnet within this vpc.
    VpcId string
    ID of the vpc.
    Description string
    Description of the ENI, maximum length 60.
    EniId string
    ID of the resource.
    Ipv4Count float64
    The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with ipv4s.
    Ipv4s []EniIpv4Args
    Applying for intranet IPv4s collection, conflict with ipv4_count. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
    Name string
    Name of the ENI, maximum length 60.
    SecurityGroups []string
    A set of security group IDs.
    Tags map[string]string
    Tags of the ENI.
    subnetId String
    ID of the subnet within this vpc.
    vpcId String
    ID of the vpc.
    description String
    Description of the ENI, maximum length 60.
    eniId String
    ID of the resource.
    ipv4Count Double
    The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with ipv4s.
    ipv4s List<EniIpv4>
    Applying for intranet IPv4s collection, conflict with ipv4_count. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
    name String
    Name of the ENI, maximum length 60.
    securityGroups List<String>
    A set of security group IDs.
    tags Map<String,String>
    Tags of the ENI.
    subnetId string
    ID of the subnet within this vpc.
    vpcId string
    ID of the vpc.
    description string
    Description of the ENI, maximum length 60.
    eniId string
    ID of the resource.
    ipv4Count number
    The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with ipv4s.
    ipv4s EniIpv4[]
    Applying for intranet IPv4s collection, conflict with ipv4_count. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
    name string
    Name of the ENI, maximum length 60.
    securityGroups string[]
    A set of security group IDs.
    tags {[key: string]: string}
    Tags of the ENI.
    subnet_id str
    ID of the subnet within this vpc.
    vpc_id str
    ID of the vpc.
    description str
    Description of the ENI, maximum length 60.
    eni_id str
    ID of the resource.
    ipv4_count float
    The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with ipv4s.
    ipv4s Sequence[EniIpv4Args]
    Applying for intranet IPv4s collection, conflict with ipv4_count. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
    name str
    Name of the ENI, maximum length 60.
    security_groups Sequence[str]
    A set of security group IDs.
    tags Mapping[str, str]
    Tags of the ENI.
    subnetId String
    ID of the subnet within this vpc.
    vpcId String
    ID of the vpc.
    description String
    Description of the ENI, maximum length 60.
    eniId String
    ID of the resource.
    ipv4Count Number
    The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with ipv4s.
    ipv4s List<Property Map>
    Applying for intranet IPv4s collection, conflict with ipv4_count. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
    name String
    Name of the ENI, maximum length 60.
    securityGroups List<String>
    A set of security group IDs.
    tags Map<String>
    Tags of the ENI.

    Outputs

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

    CdcId string
    CDC instance ID.
    CreateTime string
    Creation time of the ENI.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv4Infos List<EniIpv4Info>
    An information list of IPv4s. Each element contains the following attributes:
    Mac string
    MAC address.
    Primary bool
    Indicates whether the IP is primary.
    State string
    State of the ENI.
    CdcId string
    CDC instance ID.
    CreateTime string
    Creation time of the ENI.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv4Infos []EniIpv4Info
    An information list of IPv4s. Each element contains the following attributes:
    Mac string
    MAC address.
    Primary bool
    Indicates whether the IP is primary.
    State string
    State of the ENI.
    cdcId String
    CDC instance ID.
    createTime String
    Creation time of the ENI.
    id String
    The provider-assigned unique ID for this managed resource.
    ipv4Infos List<EniIpv4Info>
    An information list of IPv4s. Each element contains the following attributes:
    mac String
    MAC address.
    primary Boolean
    Indicates whether the IP is primary.
    state String
    State of the ENI.
    cdcId string
    CDC instance ID.
    createTime string
    Creation time of the ENI.
    id string
    The provider-assigned unique ID for this managed resource.
    ipv4Infos EniIpv4Info[]
    An information list of IPv4s. Each element contains the following attributes:
    mac string
    MAC address.
    primary boolean
    Indicates whether the IP is primary.
    state string
    State of the ENI.
    cdc_id str
    CDC instance ID.
    create_time str
    Creation time of the ENI.
    id str
    The provider-assigned unique ID for this managed resource.
    ipv4_infos Sequence[EniIpv4Info]
    An information list of IPv4s. Each element contains the following attributes:
    mac str
    MAC address.
    primary bool
    Indicates whether the IP is primary.
    state str
    State of the ENI.
    cdcId String
    CDC instance ID.
    createTime String
    Creation time of the ENI.
    id String
    The provider-assigned unique ID for this managed resource.
    ipv4Infos List<Property Map>
    An information list of IPv4s. Each element contains the following attributes:
    mac String
    MAC address.
    primary Boolean
    Indicates whether the IP is primary.
    state String
    State of the ENI.

    Look up Existing Eni Resource

    Get an existing Eni 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?: EniState, opts?: CustomResourceOptions): Eni
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cdc_id: Optional[str] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            eni_id: Optional[str] = None,
            ipv4_count: Optional[float] = None,
            ipv4_infos: Optional[Sequence[EniIpv4InfoArgs]] = None,
            ipv4s: Optional[Sequence[EniIpv4Args]] = None,
            mac: Optional[str] = None,
            name: Optional[str] = None,
            primary: Optional[bool] = None,
            security_groups: Optional[Sequence[str]] = None,
            state: Optional[str] = None,
            subnet_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            vpc_id: Optional[str] = None) -> Eni
    func GetEni(ctx *Context, name string, id IDInput, state *EniState, opts ...ResourceOption) (*Eni, error)
    public static Eni Get(string name, Input<string> id, EniState? state, CustomResourceOptions? opts = null)
    public static Eni get(String name, Output<String> id, EniState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:Eni    get:      id: ${id}
    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:
    CdcId string
    CDC instance ID.
    CreateTime string
    Creation time of the ENI.
    Description string
    Description of the ENI, maximum length 60.
    EniId string
    ID of the resource.
    Ipv4Count double
    The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with ipv4s.
    Ipv4Infos List<EniIpv4Info>
    An information list of IPv4s. Each element contains the following attributes:
    Ipv4s List<EniIpv4>
    Applying for intranet IPv4s collection, conflict with ipv4_count. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
    Mac string
    MAC address.
    Name string
    Name of the ENI, maximum length 60.
    Primary bool
    Indicates whether the IP is primary.
    SecurityGroups List<string>
    A set of security group IDs.
    State string
    State of the ENI.
    SubnetId string
    ID of the subnet within this vpc.
    Tags Dictionary<string, string>
    Tags of the ENI.
    VpcId string
    ID of the vpc.
    CdcId string
    CDC instance ID.
    CreateTime string
    Creation time of the ENI.
    Description string
    Description of the ENI, maximum length 60.
    EniId string
    ID of the resource.
    Ipv4Count float64
    The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with ipv4s.
    Ipv4Infos []EniIpv4InfoArgs
    An information list of IPv4s. Each element contains the following attributes:
    Ipv4s []EniIpv4Args
    Applying for intranet IPv4s collection, conflict with ipv4_count. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
    Mac string
    MAC address.
    Name string
    Name of the ENI, maximum length 60.
    Primary bool
    Indicates whether the IP is primary.
    SecurityGroups []string
    A set of security group IDs.
    State string
    State of the ENI.
    SubnetId string
    ID of the subnet within this vpc.
    Tags map[string]string
    Tags of the ENI.
    VpcId string
    ID of the vpc.
    cdcId String
    CDC instance ID.
    createTime String
    Creation time of the ENI.
    description String
    Description of the ENI, maximum length 60.
    eniId String
    ID of the resource.
    ipv4Count Double
    The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with ipv4s.
    ipv4Infos List<EniIpv4Info>
    An information list of IPv4s. Each element contains the following attributes:
    ipv4s List<EniIpv4>
    Applying for intranet IPv4s collection, conflict with ipv4_count. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
    mac String
    MAC address.
    name String
    Name of the ENI, maximum length 60.
    primary Boolean
    Indicates whether the IP is primary.
    securityGroups List<String>
    A set of security group IDs.
    state String
    State of the ENI.
    subnetId String
    ID of the subnet within this vpc.
    tags Map<String,String>
    Tags of the ENI.
    vpcId String
    ID of the vpc.
    cdcId string
    CDC instance ID.
    createTime string
    Creation time of the ENI.
    description string
    Description of the ENI, maximum length 60.
    eniId string
    ID of the resource.
    ipv4Count number
    The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with ipv4s.
    ipv4Infos EniIpv4Info[]
    An information list of IPv4s. Each element contains the following attributes:
    ipv4s EniIpv4[]
    Applying for intranet IPv4s collection, conflict with ipv4_count. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
    mac string
    MAC address.
    name string
    Name of the ENI, maximum length 60.
    primary boolean
    Indicates whether the IP is primary.
    securityGroups string[]
    A set of security group IDs.
    state string
    State of the ENI.
    subnetId string
    ID of the subnet within this vpc.
    tags {[key: string]: string}
    Tags of the ENI.
    vpcId string
    ID of the vpc.
    cdc_id str
    CDC instance ID.
    create_time str
    Creation time of the ENI.
    description str
    Description of the ENI, maximum length 60.
    eni_id str
    ID of the resource.
    ipv4_count float
    The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with ipv4s.
    ipv4_infos Sequence[EniIpv4InfoArgs]
    An information list of IPv4s. Each element contains the following attributes:
    ipv4s Sequence[EniIpv4Args]
    Applying for intranet IPv4s collection, conflict with ipv4_count. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
    mac str
    MAC address.
    name str
    Name of the ENI, maximum length 60.
    primary bool
    Indicates whether the IP is primary.
    security_groups Sequence[str]
    A set of security group IDs.
    state str
    State of the ENI.
    subnet_id str
    ID of the subnet within this vpc.
    tags Mapping[str, str]
    Tags of the ENI.
    vpc_id str
    ID of the vpc.
    cdcId String
    CDC instance ID.
    createTime String
    Creation time of the ENI.
    description String
    Description of the ENI, maximum length 60.
    eniId String
    ID of the resource.
    ipv4Count Number
    The number of intranet IPv4s. When it is greater than 1, there is only one primary intranet IP. The others are auxiliary intranet IPs, which conflict with ipv4s.
    ipv4Infos List<Property Map>
    An information list of IPv4s. Each element contains the following attributes:
    ipv4s List<Property Map>
    Applying for intranet IPv4s collection, conflict with ipv4_count. When there are multiple ipv4s, can only be one primary IP, and the maximum length of the array is 30. Each element contains the following attributes:
    mac String
    MAC address.
    name String
    Name of the ENI, maximum length 60.
    primary Boolean
    Indicates whether the IP is primary.
    securityGroups List<String>
    A set of security group IDs.
    state String
    State of the ENI.
    subnetId String
    ID of the subnet within this vpc.
    tags Map<String>
    Tags of the ENI.
    vpcId String
    ID of the vpc.

    Supporting Types

    EniIpv4, EniIpv4Args

    Ip string
    Intranet IP.
    Primary bool
    Indicates whether the IP is primary.
    Description string
    Description of the IP, maximum length 25.
    Ip string
    Intranet IP.
    Primary bool
    Indicates whether the IP is primary.
    Description string
    Description of the IP, maximum length 25.
    ip String
    Intranet IP.
    primary Boolean
    Indicates whether the IP is primary.
    description String
    Description of the IP, maximum length 25.
    ip string
    Intranet IP.
    primary boolean
    Indicates whether the IP is primary.
    description string
    Description of the IP, maximum length 25.
    ip str
    Intranet IP.
    primary bool
    Indicates whether the IP is primary.
    description str
    Description of the IP, maximum length 25.
    ip String
    Intranet IP.
    primary Boolean
    Indicates whether the IP is primary.
    description String
    Description of the IP, maximum length 25.

    EniIpv4Info, EniIpv4InfoArgs

    Description string
    Description of the ENI, maximum length 60.
    Ip string
    Intranet IP.
    Primary bool
    Indicates whether the IP is primary.
    Description string
    Description of the ENI, maximum length 60.
    Ip string
    Intranet IP.
    Primary bool
    Indicates whether the IP is primary.
    description String
    Description of the ENI, maximum length 60.
    ip String
    Intranet IP.
    primary Boolean
    Indicates whether the IP is primary.
    description string
    Description of the ENI, maximum length 60.
    ip string
    Intranet IP.
    primary boolean
    Indicates whether the IP is primary.
    description str
    Description of the ENI, maximum length 60.
    ip str
    Intranet IP.
    primary bool
    Indicates whether the IP is primary.
    description String
    Description of the ENI, maximum length 60.
    ip String
    Intranet IP.
    primary Boolean
    Indicates whether the IP is primary.

    Import

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

    $ pulumi import tencentcloud:index/eni:Eni  tencentcloud_eni.foo eni-qka182br
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack