1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. VpcFlowLog
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.VpcFlowLog

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a vpc flow_log

    NOTE: The cloud server instance specifications that support stream log collection include: M6ce, M6p, SA3se, S4m, DA3, ITA3, I6t, I6, S5se, SA2, SK1, S4, S5, SN3ne, S3ne, S2ne, SA2a, S3ne, SW3a, SW3b, SW3ne, ITA3, IT5c, IT5, IT5c, IT3, I3, D3, DA2, D2, M6, MA2, M4, C6, IT3a, IT3b, IT3c, C4ne, CN3ne, C3ne, GI1, PNV4, GNV4v, GNV4, GT4, GI3X, GN7, GN7vw.

    NOTE: The following models no longer support the collection of new stream logs, and the stock stream logs will no longer be reported for data from July 25, 2022: Standard models: S3, SA1, S2, S1;Memory type: M3, M2, M1;Calculation type: C4, CN3, C3, C2;Batch calculation type: BC1, BS1;HPCC: HCCIC5, HCCG5v.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const zones = tencentcloud.getAvailabilityZones({});
    const image = tencentcloud.getImages({
        imageTypes: ["PUBLIC_IMAGE"],
        imageNameRegex: "Final",
    });
    const instanceTypes = zones.then(zones => tencentcloud.getInstanceTypes({
        filters: [
            {
                name: "zone",
                values: [zones.zones?.[0]?.name],
            },
            {
                name: "instance-family",
                values: ["S5"],
            },
        ],
        cpuCoreCount: 2,
        excludeSoldOut: true,
    }));
    const logset = new tencentcloud.ClsLogset("logset", {
        logsetName: "logset",
        tags: {
            createBy: "Terraform",
        },
    });
    const topic = new tencentcloud.ClsTopic("topic", {
        topicName: "topic",
        logsetId: logset.clsLogsetId,
        autoSplit: false,
        maxSplitPartitions: 20,
        partitionCount: 1,
        period: 10,
        storageType: "hot",
        tags: {
            createBy: "Terraform",
        },
    });
    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 exampleEni = new tencentcloud.Eni("exampleEni", {
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        description: "eni desc",
        ipv4Count: 1,
    });
    const exampleInstance = new tencentcloud.Instance("exampleInstance", {
        instanceName: "tf-example",
        availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
        imageId: image.then(image => image.images?.[0]?.imageId),
        instanceType: instanceTypes.then(instanceTypes => instanceTypes.instanceTypes?.[0]?.instanceType),
        systemDiskType: "CLOUD_PREMIUM",
        disableSecurityService: true,
        disableMonitorService: true,
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
    });
    const exampleEniAttachment = new tencentcloud.EniAttachment("exampleEniAttachment", {
        eniId: exampleEni.eniId,
        instanceId: exampleInstance.instanceId,
    });
    const exampleVpcFlowLog = new tencentcloud.VpcFlowLog("exampleVpcFlowLog", {
        flowLogName: "tf-example",
        resourceType: "NETWORKINTERFACE",
        resourceId: exampleEniAttachment.eniId,
        trafficType: "ACCEPT",
        vpcId: vpc.vpcId,
        flowLogDescription: "this is a testing flow log",
        cloudLogId: topic.clsTopicId,
        storageType: "cls",
        tags: {
            createBy: "Terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    zones = tencentcloud.get_availability_zones()
    image = tencentcloud.get_images(image_types=["PUBLIC_IMAGE"],
        image_name_regex="Final")
    instance_types = tencentcloud.get_instance_types(filters=[
            {
                "name": "zone",
                "values": [zones.zones[0].name],
            },
            {
                "name": "instance-family",
                "values": ["S5"],
            },
        ],
        cpu_core_count=2,
        exclude_sold_out=True)
    logset = tencentcloud.ClsLogset("logset",
        logset_name="logset",
        tags={
            "createBy": "Terraform",
        })
    topic = tencentcloud.ClsTopic("topic",
        topic_name="topic",
        logset_id=logset.cls_logset_id,
        auto_split=False,
        max_split_partitions=20,
        partition_count=1,
        period=10,
        storage_type="hot",
        tags={
            "createBy": "Terraform",
        })
    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)
    example_eni = tencentcloud.Eni("exampleEni",
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        description="eni desc",
        ipv4_count=1)
    example_instance = tencentcloud.Instance("exampleInstance",
        instance_name="tf-example",
        availability_zone=zones.zones[0].name,
        image_id=image.images[0].image_id,
        instance_type=instance_types.instance_types[0].instance_type,
        system_disk_type="CLOUD_PREMIUM",
        disable_security_service=True,
        disable_monitor_service=True,
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id)
    example_eni_attachment = tencentcloud.EniAttachment("exampleEniAttachment",
        eni_id=example_eni.eni_id,
        instance_id=example_instance.instance_id)
    example_vpc_flow_log = tencentcloud.VpcFlowLog("exampleVpcFlowLog",
        flow_log_name="tf-example",
        resource_type="NETWORKINTERFACE",
        resource_id=example_eni_attachment.eni_id,
        traffic_type="ACCEPT",
        vpc_id=vpc.vpc_id,
        flow_log_description="this is a testing flow log",
        cloud_log_id=topic.cls_topic_id,
        storage_type="cls",
        tags={
            "createBy": "Terraform",
        })
    
    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.GetAvailabilityZones(ctx, &tencentcloud.GetAvailabilityZonesArgs{
    }, nil);
    if err != nil {
    return err
    }
    image, err := tencentcloud.GetImages(ctx, &tencentcloud.GetImagesArgs{
    ImageTypes: []string{
    "PUBLIC_IMAGE",
    },
    ImageNameRegex: pulumi.StringRef("Final"),
    }, nil);
    if err != nil {
    return err
    }
    instanceTypes, err := tencentcloud.GetInstanceTypes(ctx, &tencentcloud.GetInstanceTypesArgs{
    Filters: []tencentcloud.GetInstanceTypesFilter{
    {
    Name: "zone",
    Values: interface{}{
    zones.Zones[0].Name,
    },
    },
    {
    Name: "instance-family",
    Values: []string{
    "S5",
    },
    },
    },
    CpuCoreCount: pulumi.Float64Ref(2),
    ExcludeSoldOut: pulumi.BoolRef(true),
    }, nil);
    if err != nil {
    return err
    }
    logset, err := tencentcloud.NewClsLogset(ctx, "logset", &tencentcloud.ClsLogsetArgs{
    LogsetName: pulumi.String("logset"),
    Tags: pulumi.StringMap{
    "createBy": pulumi.String("Terraform"),
    },
    })
    if err != nil {
    return err
    }
    topic, err := tencentcloud.NewClsTopic(ctx, "topic", &tencentcloud.ClsTopicArgs{
    TopicName: pulumi.String("topic"),
    LogsetId: logset.ClsLogsetId,
    AutoSplit: pulumi.Bool(false),
    MaxSplitPartitions: pulumi.Float64(20),
    PartitionCount: pulumi.Float64(1),
    Period: pulumi.Float64(10),
    StorageType: pulumi.String("hot"),
    Tags: pulumi.StringMap{
    "createBy": pulumi.String("Terraform"),
    },
    })
    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
    }
    exampleEni, err := tencentcloud.NewEni(ctx, "exampleEni", &tencentcloud.EniArgs{
    VpcId: vpc.VpcId,
    SubnetId: subnet.SubnetId,
    Description: pulumi.String("eni desc"),
    Ipv4Count: pulumi.Float64(1),
    })
    if err != nil {
    return err
    }
    exampleInstance, err := tencentcloud.NewInstance(ctx, "exampleInstance", &tencentcloud.InstanceArgs{
    InstanceName: pulumi.String("tf-example"),
    AvailabilityZone: pulumi.String(zones.Zones[0].Name),
    ImageId: pulumi.String(image.Images[0].ImageId),
    InstanceType: pulumi.String(instanceTypes.InstanceTypes[0].InstanceType),
    SystemDiskType: pulumi.String("CLOUD_PREMIUM"),
    DisableSecurityService: pulumi.Bool(true),
    DisableMonitorService: pulumi.Bool(true),
    VpcId: vpc.VpcId,
    SubnetId: subnet.SubnetId,
    })
    if err != nil {
    return err
    }
    exampleEniAttachment, err := tencentcloud.NewEniAttachment(ctx, "exampleEniAttachment", &tencentcloud.EniAttachmentArgs{
    EniId: exampleEni.EniId,
    InstanceId: exampleInstance.InstanceId,
    })
    if err != nil {
    return err
    }
    _, err = tencentcloud.NewVpcFlowLog(ctx, "exampleVpcFlowLog", &tencentcloud.VpcFlowLogArgs{
    FlowLogName: pulumi.String("tf-example"),
    ResourceType: pulumi.String("NETWORKINTERFACE"),
    ResourceId: exampleEniAttachment.EniId,
    TrafficType: pulumi.String("ACCEPT"),
    VpcId: vpc.VpcId,
    FlowLogDescription: pulumi.String("this is a testing flow log"),
    CloudLogId: topic.ClsTopicId,
    StorageType: pulumi.String("cls"),
    Tags: pulumi.StringMap{
    "createBy": pulumi.String("Terraform"),
    },
    })
    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.GetAvailabilityZones.Invoke();
    
        var image = Tencentcloud.GetImages.Invoke(new()
        {
            ImageTypes = new[]
            {
                "PUBLIC_IMAGE",
            },
            ImageNameRegex = "Final",
        });
    
        var instanceTypes = Tencentcloud.GetInstanceTypes.Invoke(new()
        {
            Filters = new[]
            {
                new Tencentcloud.Inputs.GetInstanceTypesFilterInputArgs
                {
                    Name = "zone",
                    Values = new[]
                    {
                        zones.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Zones[0]?.Name),
                    },
                },
                new Tencentcloud.Inputs.GetInstanceTypesFilterInputArgs
                {
                    Name = "instance-family",
                    Values = new[]
                    {
                        "S5",
                    },
                },
            },
            CpuCoreCount = 2,
            ExcludeSoldOut = true,
        });
    
        var logset = new Tencentcloud.ClsLogset("logset", new()
        {
            LogsetName = "logset",
            Tags = 
            {
                { "createBy", "Terraform" },
            },
        });
    
        var topic = new Tencentcloud.ClsTopic("topic", new()
        {
            TopicName = "topic",
            LogsetId = logset.ClsLogsetId,
            AutoSplit = false,
            MaxSplitPartitions = 20,
            PartitionCount = 1,
            Period = 10,
            StorageType = "hot",
            Tags = 
            {
                { "createBy", "Terraform" },
            },
        });
    
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            AvailabilityZone = zones.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Zones[0]?.Name),
            VpcId = vpc.VpcId,
            CidrBlock = "10.0.0.0/16",
            IsMulticast = false,
        });
    
        var exampleEni = new Tencentcloud.Eni("exampleEni", new()
        {
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            Description = "eni desc",
            Ipv4Count = 1,
        });
    
        var exampleInstance = new Tencentcloud.Instance("exampleInstance", new()
        {
            InstanceName = "tf-example",
            AvailabilityZone = zones.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Zones[0]?.Name),
            ImageId = image.Apply(getImagesResult => getImagesResult.Images[0]?.ImageId),
            InstanceType = instanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.InstanceType),
            SystemDiskType = "CLOUD_PREMIUM",
            DisableSecurityService = true,
            DisableMonitorService = true,
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
        });
    
        var exampleEniAttachment = new Tencentcloud.EniAttachment("exampleEniAttachment", new()
        {
            EniId = exampleEni.EniId,
            InstanceId = exampleInstance.InstanceId,
        });
    
        var exampleVpcFlowLog = new Tencentcloud.VpcFlowLog("exampleVpcFlowLog", new()
        {
            FlowLogName = "tf-example",
            ResourceType = "NETWORKINTERFACE",
            ResourceId = exampleEniAttachment.EniId,
            TrafficType = "ACCEPT",
            VpcId = vpc.VpcId,
            FlowLogDescription = "this is a testing flow log",
            CloudLogId = topic.ClsTopicId,
            StorageType = "cls",
            Tags = 
            {
                { "createBy", "Terraform" },
            },
        });
    
    });
    
    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.GetAvailabilityZonesArgs;
    import com.pulumi.tencentcloud.inputs.GetImagesArgs;
    import com.pulumi.tencentcloud.inputs.GetInstanceTypesArgs;
    import com.pulumi.tencentcloud.ClsLogset;
    import com.pulumi.tencentcloud.ClsLogsetArgs;
    import com.pulumi.tencentcloud.ClsTopic;
    import com.pulumi.tencentcloud.ClsTopicArgs;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Subnet;
    import com.pulumi.tencentcloud.SubnetArgs;
    import com.pulumi.tencentcloud.Eni;
    import com.pulumi.tencentcloud.EniArgs;
    import com.pulumi.tencentcloud.Instance;
    import com.pulumi.tencentcloud.InstanceArgs;
    import com.pulumi.tencentcloud.EniAttachment;
    import com.pulumi.tencentcloud.EniAttachmentArgs;
    import com.pulumi.tencentcloud.VpcFlowLog;
    import com.pulumi.tencentcloud.VpcFlowLogArgs;
    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.getAvailabilityZones();
    
            final var image = TencentcloudFunctions.getImages(GetImagesArgs.builder()
                .imageTypes("PUBLIC_IMAGE")
                .imageNameRegex("Final")
                .build());
    
            final var instanceTypes = TencentcloudFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .filters(            
                    GetInstanceTypesFilterArgs.builder()
                        .name("zone")
                        .values(zones.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.zones()[0].name()))
                        .build(),
                    GetInstanceTypesFilterArgs.builder()
                        .name("instance-family")
                        .values("S5")
                        .build())
                .cpuCoreCount(2)
                .excludeSoldOut(true)
                .build());
    
            var logset = new ClsLogset("logset", ClsLogsetArgs.builder()
                .logsetName("logset")
                .tags(Map.of("createBy", "Terraform"))
                .build());
    
            var topic = new ClsTopic("topic", ClsTopicArgs.builder()
                .topicName("topic")
                .logsetId(logset.clsLogsetId())
                .autoSplit(false)
                .maxSplitPartitions(20)
                .partitionCount(1)
                .period(10)
                .storageType("hot")
                .tags(Map.of("createBy", "Terraform"))
                .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(getAvailabilityZonesResult -> getAvailabilityZonesResult.zones()[0].name()))
                .vpcId(vpc.vpcId())
                .cidrBlock("10.0.0.0/16")
                .isMulticast(false)
                .build());
    
            var exampleEni = new Eni("exampleEni", EniArgs.builder()
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .description("eni desc")
                .ipv4Count(1)
                .build());
    
            var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
                .instanceName("tf-example")
                .availabilityZone(zones.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.zones()[0].name()))
                .imageId(image.applyValue(getImagesResult -> getImagesResult.images()[0].imageId()))
                .instanceType(instanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].instanceType()))
                .systemDiskType("CLOUD_PREMIUM")
                .disableSecurityService(true)
                .disableMonitorService(true)
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .build());
    
            var exampleEniAttachment = new EniAttachment("exampleEniAttachment", EniAttachmentArgs.builder()
                .eniId(exampleEni.eniId())
                .instanceId(exampleInstance.instanceId())
                .build());
    
            var exampleVpcFlowLog = new VpcFlowLog("exampleVpcFlowLog", VpcFlowLogArgs.builder()
                .flowLogName("tf-example")
                .resourceType("NETWORKINTERFACE")
                .resourceId(exampleEniAttachment.eniId())
                .trafficType("ACCEPT")
                .vpcId(vpc.vpcId())
                .flowLogDescription("this is a testing flow log")
                .cloudLogId(topic.clsTopicId())
                .storageType("cls")
                .tags(Map.of("createBy", "Terraform"))
                .build());
    
        }
    }
    
    resources:
      logset:
        type: tencentcloud:ClsLogset
        properties:
          logsetName: logset
          tags:
            createBy: Terraform
      topic:
        type: tencentcloud:ClsTopic
        properties:
          topicName: topic
          logsetId: ${logset.clsLogsetId}
          autoSplit: false
          maxSplitPartitions: 20
          partitionCount: 1
          period: 10
          storageType: hot
          tags:
            createBy: Terraform
      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
      exampleEni:
        type: tencentcloud:Eni
        properties:
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
          description: eni desc
          ipv4Count: 1
      exampleInstance:
        type: tencentcloud:Instance
        properties:
          instanceName: tf-example
          availabilityZone: ${zones.zones[0].name}
          imageId: ${image.images[0].imageId}
          instanceType: ${instanceTypes.instanceTypes[0].instanceType}
          systemDiskType: CLOUD_PREMIUM
          disableSecurityService: true
          disableMonitorService: true
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
      exampleEniAttachment:
        type: tencentcloud:EniAttachment
        properties:
          eniId: ${exampleEni.eniId}
          instanceId: ${exampleInstance.instanceId}
      exampleVpcFlowLog:
        type: tencentcloud:VpcFlowLog
        properties:
          flowLogName: tf-example
          resourceType: NETWORKINTERFACE
          resourceId: ${exampleEniAttachment.eniId}
          trafficType: ACCEPT
          vpcId: ${vpc.vpcId}
          flowLogDescription: this is a testing flow log
          cloudLogId: ${topic.clsTopicId}
          storageType: cls
          tags:
            createBy: Terraform
    variables:
      zones:
        fn::invoke:
          function: tencentcloud:getAvailabilityZones
          arguments: {}
      image:
        fn::invoke:
          function: tencentcloud:getImages
          arguments:
            imageTypes:
              - PUBLIC_IMAGE
            imageNameRegex: Final
      instanceTypes:
        fn::invoke:
          function: tencentcloud:getInstanceTypes
          arguments:
            filters:
              - name: zone
                values:
                  - ${zones.zones[0].name}
              - name: instance-family
                values:
                  - S5
            cpuCoreCount: 2
            excludeSoldOut: true
    

    Create VpcFlowLog Resource

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

    Constructor syntax

    new VpcFlowLog(name: string, args: VpcFlowLogArgs, opts?: CustomResourceOptions);
    @overload
    def VpcFlowLog(resource_name: str,
                   args: VpcFlowLogArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcFlowLog(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   flow_log_name: Optional[str] = None,
                   resource_id: Optional[str] = None,
                   resource_type: Optional[str] = None,
                   traffic_type: Optional[str] = None,
                   cloud_log_id: Optional[str] = None,
                   cloud_log_region: Optional[str] = None,
                   flow_log_description: Optional[str] = None,
                   flow_log_storage: Optional[VpcFlowLogFlowLogStorageArgs] = None,
                   storage_type: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   vpc_flow_log_id: Optional[str] = None,
                   vpc_id: Optional[str] = None)
    func NewVpcFlowLog(ctx *Context, name string, args VpcFlowLogArgs, opts ...ResourceOption) (*VpcFlowLog, error)
    public VpcFlowLog(string name, VpcFlowLogArgs args, CustomResourceOptions? opts = null)
    public VpcFlowLog(String name, VpcFlowLogArgs args)
    public VpcFlowLog(String name, VpcFlowLogArgs args, CustomResourceOptions options)
    
    type: tencentcloud:VpcFlowLog
    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 VpcFlowLogArgs
    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 VpcFlowLogArgs
    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 VpcFlowLogArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcFlowLogArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcFlowLogArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    FlowLogName string
    Specify flow log name.
    ResourceId string
    Specify resource unique Id of resource_type configured.
    ResourceType string
    Specify resource type. NOTE: Only support NETWORKINTERFACE for now. Values: VPC, SUBNET, NETWORKINTERFACE, CCN, NAT, DCG.
    TrafficType string
    Specify log traffic type, values: ACCEPT, REJECT, ALL.
    CloudLogId string
    Specify flow log storage id, just set cls topic id.
    CloudLogRegion string
    Specify flow log storage region, default using current.
    FlowLogDescription string
    Specify flow Log description.
    FlowLogStorage VpcFlowLogFlowLogStorage
    Specify consumer detail, required while storage_type is ckafka.
    StorageType string
    Specify consumer type, values: cls, ckafka.
    Tags Dictionary<string, string>
    Tag description list.
    VpcFlowLogId string
    ID of the resource.
    VpcId string
    Specify vpc Id, ignore while resource_type is CCN (unsupported) but required while other types.
    FlowLogName string
    Specify flow log name.
    ResourceId string
    Specify resource unique Id of resource_type configured.
    ResourceType string
    Specify resource type. NOTE: Only support NETWORKINTERFACE for now. Values: VPC, SUBNET, NETWORKINTERFACE, CCN, NAT, DCG.
    TrafficType string
    Specify log traffic type, values: ACCEPT, REJECT, ALL.
    CloudLogId string
    Specify flow log storage id, just set cls topic id.
    CloudLogRegion string
    Specify flow log storage region, default using current.
    FlowLogDescription string
    Specify flow Log description.
    FlowLogStorage VpcFlowLogFlowLogStorageArgs
    Specify consumer detail, required while storage_type is ckafka.
    StorageType string
    Specify consumer type, values: cls, ckafka.
    Tags map[string]string
    Tag description list.
    VpcFlowLogId string
    ID of the resource.
    VpcId string
    Specify vpc Id, ignore while resource_type is CCN (unsupported) but required while other types.
    flowLogName String
    Specify flow log name.
    resourceId String
    Specify resource unique Id of resource_type configured.
    resourceType String
    Specify resource type. NOTE: Only support NETWORKINTERFACE for now. Values: VPC, SUBNET, NETWORKINTERFACE, CCN, NAT, DCG.
    trafficType String
    Specify log traffic type, values: ACCEPT, REJECT, ALL.
    cloudLogId String
    Specify flow log storage id, just set cls topic id.
    cloudLogRegion String
    Specify flow log storage region, default using current.
    flowLogDescription String
    Specify flow Log description.
    flowLogStorage VpcFlowLogFlowLogStorage
    Specify consumer detail, required while storage_type is ckafka.
    storageType String
    Specify consumer type, values: cls, ckafka.
    tags Map<String,String>
    Tag description list.
    vpcFlowLogId String
    ID of the resource.
    vpcId String
    Specify vpc Id, ignore while resource_type is CCN (unsupported) but required while other types.
    flowLogName string
    Specify flow log name.
    resourceId string
    Specify resource unique Id of resource_type configured.
    resourceType string
    Specify resource type. NOTE: Only support NETWORKINTERFACE for now. Values: VPC, SUBNET, NETWORKINTERFACE, CCN, NAT, DCG.
    trafficType string
    Specify log traffic type, values: ACCEPT, REJECT, ALL.
    cloudLogId string
    Specify flow log storage id, just set cls topic id.
    cloudLogRegion string
    Specify flow log storage region, default using current.
    flowLogDescription string
    Specify flow Log description.
    flowLogStorage VpcFlowLogFlowLogStorage
    Specify consumer detail, required while storage_type is ckafka.
    storageType string
    Specify consumer type, values: cls, ckafka.
    tags {[key: string]: string}
    Tag description list.
    vpcFlowLogId string
    ID of the resource.
    vpcId string
    Specify vpc Id, ignore while resource_type is CCN (unsupported) but required while other types.
    flow_log_name str
    Specify flow log name.
    resource_id str
    Specify resource unique Id of resource_type configured.
    resource_type str
    Specify resource type. NOTE: Only support NETWORKINTERFACE for now. Values: VPC, SUBNET, NETWORKINTERFACE, CCN, NAT, DCG.
    traffic_type str
    Specify log traffic type, values: ACCEPT, REJECT, ALL.
    cloud_log_id str
    Specify flow log storage id, just set cls topic id.
    cloud_log_region str
    Specify flow log storage region, default using current.
    flow_log_description str
    Specify flow Log description.
    flow_log_storage VpcFlowLogFlowLogStorageArgs
    Specify consumer detail, required while storage_type is ckafka.
    storage_type str
    Specify consumer type, values: cls, ckafka.
    tags Mapping[str, str]
    Tag description list.
    vpc_flow_log_id str
    ID of the resource.
    vpc_id str
    Specify vpc Id, ignore while resource_type is CCN (unsupported) but required while other types.
    flowLogName String
    Specify flow log name.
    resourceId String
    Specify resource unique Id of resource_type configured.
    resourceType String
    Specify resource type. NOTE: Only support NETWORKINTERFACE for now. Values: VPC, SUBNET, NETWORKINTERFACE, CCN, NAT, DCG.
    trafficType String
    Specify log traffic type, values: ACCEPT, REJECT, ALL.
    cloudLogId String
    Specify flow log storage id, just set cls topic id.
    cloudLogRegion String
    Specify flow log storage region, default using current.
    flowLogDescription String
    Specify flow Log description.
    flowLogStorage Property Map
    Specify consumer detail, required while storage_type is ckafka.
    storageType String
    Specify consumer type, values: cls, ckafka.
    tags Map<String>
    Tag description list.
    vpcFlowLogId String
    ID of the resource.
    vpcId String
    Specify vpc Id, ignore while resource_type is CCN (unsupported) but required while other types.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VpcFlowLog Resource

    Get an existing VpcFlowLog 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?: VpcFlowLogState, opts?: CustomResourceOptions): VpcFlowLog
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cloud_log_id: Optional[str] = None,
            cloud_log_region: Optional[str] = None,
            flow_log_description: Optional[str] = None,
            flow_log_name: Optional[str] = None,
            flow_log_storage: Optional[VpcFlowLogFlowLogStorageArgs] = None,
            resource_id: Optional[str] = None,
            resource_type: Optional[str] = None,
            storage_type: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            traffic_type: Optional[str] = None,
            vpc_flow_log_id: Optional[str] = None,
            vpc_id: Optional[str] = None) -> VpcFlowLog
    func GetVpcFlowLog(ctx *Context, name string, id IDInput, state *VpcFlowLogState, opts ...ResourceOption) (*VpcFlowLog, error)
    public static VpcFlowLog Get(string name, Input<string> id, VpcFlowLogState? state, CustomResourceOptions? opts = null)
    public static VpcFlowLog get(String name, Output<String> id, VpcFlowLogState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:VpcFlowLog    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:
    CloudLogId string
    Specify flow log storage id, just set cls topic id.
    CloudLogRegion string
    Specify flow log storage region, default using current.
    FlowLogDescription string
    Specify flow Log description.
    FlowLogName string
    Specify flow log name.
    FlowLogStorage VpcFlowLogFlowLogStorage
    Specify consumer detail, required while storage_type is ckafka.
    ResourceId string
    Specify resource unique Id of resource_type configured.
    ResourceType string
    Specify resource type. NOTE: Only support NETWORKINTERFACE for now. Values: VPC, SUBNET, NETWORKINTERFACE, CCN, NAT, DCG.
    StorageType string
    Specify consumer type, values: cls, ckafka.
    Tags Dictionary<string, string>
    Tag description list.
    TrafficType string
    Specify log traffic type, values: ACCEPT, REJECT, ALL.
    VpcFlowLogId string
    ID of the resource.
    VpcId string
    Specify vpc Id, ignore while resource_type is CCN (unsupported) but required while other types.
    CloudLogId string
    Specify flow log storage id, just set cls topic id.
    CloudLogRegion string
    Specify flow log storage region, default using current.
    FlowLogDescription string
    Specify flow Log description.
    FlowLogName string
    Specify flow log name.
    FlowLogStorage VpcFlowLogFlowLogStorageArgs
    Specify consumer detail, required while storage_type is ckafka.
    ResourceId string
    Specify resource unique Id of resource_type configured.
    ResourceType string
    Specify resource type. NOTE: Only support NETWORKINTERFACE for now. Values: VPC, SUBNET, NETWORKINTERFACE, CCN, NAT, DCG.
    StorageType string
    Specify consumer type, values: cls, ckafka.
    Tags map[string]string
    Tag description list.
    TrafficType string
    Specify log traffic type, values: ACCEPT, REJECT, ALL.
    VpcFlowLogId string
    ID of the resource.
    VpcId string
    Specify vpc Id, ignore while resource_type is CCN (unsupported) but required while other types.
    cloudLogId String
    Specify flow log storage id, just set cls topic id.
    cloudLogRegion String
    Specify flow log storage region, default using current.
    flowLogDescription String
    Specify flow Log description.
    flowLogName String
    Specify flow log name.
    flowLogStorage VpcFlowLogFlowLogStorage
    Specify consumer detail, required while storage_type is ckafka.
    resourceId String
    Specify resource unique Id of resource_type configured.
    resourceType String
    Specify resource type. NOTE: Only support NETWORKINTERFACE for now. Values: VPC, SUBNET, NETWORKINTERFACE, CCN, NAT, DCG.
    storageType String
    Specify consumer type, values: cls, ckafka.
    tags Map<String,String>
    Tag description list.
    trafficType String
    Specify log traffic type, values: ACCEPT, REJECT, ALL.
    vpcFlowLogId String
    ID of the resource.
    vpcId String
    Specify vpc Id, ignore while resource_type is CCN (unsupported) but required while other types.
    cloudLogId string
    Specify flow log storage id, just set cls topic id.
    cloudLogRegion string
    Specify flow log storage region, default using current.
    flowLogDescription string
    Specify flow Log description.
    flowLogName string
    Specify flow log name.
    flowLogStorage VpcFlowLogFlowLogStorage
    Specify consumer detail, required while storage_type is ckafka.
    resourceId string
    Specify resource unique Id of resource_type configured.
    resourceType string
    Specify resource type. NOTE: Only support NETWORKINTERFACE for now. Values: VPC, SUBNET, NETWORKINTERFACE, CCN, NAT, DCG.
    storageType string
    Specify consumer type, values: cls, ckafka.
    tags {[key: string]: string}
    Tag description list.
    trafficType string
    Specify log traffic type, values: ACCEPT, REJECT, ALL.
    vpcFlowLogId string
    ID of the resource.
    vpcId string
    Specify vpc Id, ignore while resource_type is CCN (unsupported) but required while other types.
    cloud_log_id str
    Specify flow log storage id, just set cls topic id.
    cloud_log_region str
    Specify flow log storage region, default using current.
    flow_log_description str
    Specify flow Log description.
    flow_log_name str
    Specify flow log name.
    flow_log_storage VpcFlowLogFlowLogStorageArgs
    Specify consumer detail, required while storage_type is ckafka.
    resource_id str
    Specify resource unique Id of resource_type configured.
    resource_type str
    Specify resource type. NOTE: Only support NETWORKINTERFACE for now. Values: VPC, SUBNET, NETWORKINTERFACE, CCN, NAT, DCG.
    storage_type str
    Specify consumer type, values: cls, ckafka.
    tags Mapping[str, str]
    Tag description list.
    traffic_type str
    Specify log traffic type, values: ACCEPT, REJECT, ALL.
    vpc_flow_log_id str
    ID of the resource.
    vpc_id str
    Specify vpc Id, ignore while resource_type is CCN (unsupported) but required while other types.
    cloudLogId String
    Specify flow log storage id, just set cls topic id.
    cloudLogRegion String
    Specify flow log storage region, default using current.
    flowLogDescription String
    Specify flow Log description.
    flowLogName String
    Specify flow log name.
    flowLogStorage Property Map
    Specify consumer detail, required while storage_type is ckafka.
    resourceId String
    Specify resource unique Id of resource_type configured.
    resourceType String
    Specify resource type. NOTE: Only support NETWORKINTERFACE for now. Values: VPC, SUBNET, NETWORKINTERFACE, CCN, NAT, DCG.
    storageType String
    Specify consumer type, values: cls, ckafka.
    tags Map<String>
    Tag description list.
    trafficType String
    Specify log traffic type, values: ACCEPT, REJECT, ALL.
    vpcFlowLogId String
    ID of the resource.
    vpcId String
    Specify vpc Id, ignore while resource_type is CCN (unsupported) but required while other types.

    Supporting Types

    VpcFlowLogFlowLogStorage, VpcFlowLogFlowLogStorageArgs

    StorageId string
    Specify storage instance id, required while storage_type is ckafka.
    StorageTopic string
    Specify storage topic id, required while storage_type is ckafka.
    StorageId string
    Specify storage instance id, required while storage_type is ckafka.
    StorageTopic string
    Specify storage topic id, required while storage_type is ckafka.
    storageId String
    Specify storage instance id, required while storage_type is ckafka.
    storageTopic String
    Specify storage topic id, required while storage_type is ckafka.
    storageId string
    Specify storage instance id, required while storage_type is ckafka.
    storageTopic string
    Specify storage topic id, required while storage_type is ckafka.
    storage_id str
    Specify storage instance id, required while storage_type is ckafka.
    storage_topic str
    Specify storage topic id, required while storage_type is ckafka.
    storageId String
    Specify storage instance id, required while storage_type is ckafka.
    storageTopic String
    Specify storage topic id, required while storage_type is ckafka.

    Import

    vpc flow_log can be imported using the flow log Id combine vpc Id, e.g.

    $ pulumi import tencentcloud:index/vpcFlowLog:VpcFlowLog example fl-7k59x22l#vpc-n6qjlen5
    

    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.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack