tencentcloud.VpcFlowLog
Explore with Pulumi AI
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:
- Flow
Log stringName - Specify flow log name.
- Resource
Id string - Specify resource unique Id of
resource_type
configured. - Resource
Type string - Specify resource type. NOTE: Only support
NETWORKINTERFACE
for now. Values:VPC
,SUBNET
,NETWORKINTERFACE
,CCN
,NAT
,DCG
. - Traffic
Type string - Specify log traffic type, values:
ACCEPT
,REJECT
,ALL
. - Cloud
Log stringId - Specify flow log storage id, just set cls topic id.
- Cloud
Log stringRegion - Specify flow log storage region, default using current.
- Flow
Log stringDescription - Specify flow Log description.
- Flow
Log VpcStorage Flow Log Flow Log Storage - Specify consumer detail, required while
storage_type
isckafka
. - Storage
Type string - Specify consumer type, values:
cls
,ckafka
. - Dictionary<string, string>
- Tag description list.
- Vpc
Flow stringLog Id - ID of the resource.
- Vpc
Id string - Specify vpc Id, ignore while
resource_type
isCCN
(unsupported) but required while other types.
- Flow
Log stringName - Specify flow log name.
- Resource
Id string - Specify resource unique Id of
resource_type
configured. - Resource
Type string - Specify resource type. NOTE: Only support
NETWORKINTERFACE
for now. Values:VPC
,SUBNET
,NETWORKINTERFACE
,CCN
,NAT
,DCG
. - Traffic
Type string - Specify log traffic type, values:
ACCEPT
,REJECT
,ALL
. - Cloud
Log stringId - Specify flow log storage id, just set cls topic id.
- Cloud
Log stringRegion - Specify flow log storage region, default using current.
- Flow
Log stringDescription - Specify flow Log description.
- Flow
Log VpcStorage Flow Log Flow Log Storage Args - Specify consumer detail, required while
storage_type
isckafka
. - Storage
Type string - Specify consumer type, values:
cls
,ckafka
. - map[string]string
- Tag description list.
- Vpc
Flow stringLog Id - ID of the resource.
- Vpc
Id string - Specify vpc Id, ignore while
resource_type
isCCN
(unsupported) but required while other types.
- flow
Log StringName - Specify flow log name.
- resource
Id String - Specify resource unique Id of
resource_type
configured. - resource
Type String - Specify resource type. NOTE: Only support
NETWORKINTERFACE
for now. Values:VPC
,SUBNET
,NETWORKINTERFACE
,CCN
,NAT
,DCG
. - traffic
Type String - Specify log traffic type, values:
ACCEPT
,REJECT
,ALL
. - cloud
Log StringId - Specify flow log storage id, just set cls topic id.
- cloud
Log StringRegion - Specify flow log storage region, default using current.
- flow
Log StringDescription - Specify flow Log description.
- flow
Log VpcStorage Flow Log Flow Log Storage - Specify consumer detail, required while
storage_type
isckafka
. - storage
Type String - Specify consumer type, values:
cls
,ckafka
. - Map<String,String>
- Tag description list.
- vpc
Flow StringLog Id - ID of the resource.
- vpc
Id String - Specify vpc Id, ignore while
resource_type
isCCN
(unsupported) but required while other types.
- flow
Log stringName - Specify flow log name.
- resource
Id string - Specify resource unique Id of
resource_type
configured. - resource
Type string - Specify resource type. NOTE: Only support
NETWORKINTERFACE
for now. Values:VPC
,SUBNET
,NETWORKINTERFACE
,CCN
,NAT
,DCG
. - traffic
Type string - Specify log traffic type, values:
ACCEPT
,REJECT
,ALL
. - cloud
Log stringId - Specify flow log storage id, just set cls topic id.
- cloud
Log stringRegion - Specify flow log storage region, default using current.
- flow
Log stringDescription - Specify flow Log description.
- flow
Log VpcStorage Flow Log Flow Log Storage - Specify consumer detail, required while
storage_type
isckafka
. - storage
Type string - Specify consumer type, values:
cls
,ckafka
. - {[key: string]: string}
- Tag description list.
- vpc
Flow stringLog Id - ID of the resource.
- vpc
Id string - Specify vpc Id, ignore while
resource_type
isCCN
(unsupported) but required while other types.
- flow_
log_ strname - 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_ strid - Specify flow log storage id, just set cls topic id.
- cloud_
log_ strregion - Specify flow log storage region, default using current.
- flow_
log_ strdescription - Specify flow Log description.
- flow_
log_ Vpcstorage Flow Log Flow Log Storage Args - Specify consumer detail, required while
storage_type
isckafka
. - storage_
type str - Specify consumer type, values:
cls
,ckafka
. - Mapping[str, str]
- Tag description list.
- vpc_
flow_ strlog_ id - ID of the resource.
- vpc_
id str - Specify vpc Id, ignore while
resource_type
isCCN
(unsupported) but required while other types.
- flow
Log StringName - Specify flow log name.
- resource
Id String - Specify resource unique Id of
resource_type
configured. - resource
Type String - Specify resource type. NOTE: Only support
NETWORKINTERFACE
for now. Values:VPC
,SUBNET
,NETWORKINTERFACE
,CCN
,NAT
,DCG
. - traffic
Type String - Specify log traffic type, values:
ACCEPT
,REJECT
,ALL
. - cloud
Log StringId - Specify flow log storage id, just set cls topic id.
- cloud
Log StringRegion - Specify flow log storage region, default using current.
- flow
Log StringDescription - Specify flow Log description.
- flow
Log Property MapStorage - Specify consumer detail, required while
storage_type
isckafka
. - storage
Type String - Specify consumer type, values:
cls
,ckafka
. - Map<String>
- Tag description list.
- vpc
Flow StringLog Id - ID of the resource.
- vpc
Id String - Specify vpc Id, ignore while
resource_type
isCCN
(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.
- Cloud
Log stringId - Specify flow log storage id, just set cls topic id.
- Cloud
Log stringRegion - Specify flow log storage region, default using current.
- Flow
Log stringDescription - Specify flow Log description.
- Flow
Log stringName - Specify flow log name.
- Flow
Log VpcStorage Flow Log Flow Log Storage - Specify consumer detail, required while
storage_type
isckafka
. - Resource
Id string - Specify resource unique Id of
resource_type
configured. - Resource
Type string - Specify resource type. NOTE: Only support
NETWORKINTERFACE
for now. Values:VPC
,SUBNET
,NETWORKINTERFACE
,CCN
,NAT
,DCG
. - Storage
Type string - Specify consumer type, values:
cls
,ckafka
. - Dictionary<string, string>
- Tag description list.
- Traffic
Type string - Specify log traffic type, values:
ACCEPT
,REJECT
,ALL
. - Vpc
Flow stringLog Id - ID of the resource.
- Vpc
Id string - Specify vpc Id, ignore while
resource_type
isCCN
(unsupported) but required while other types.
- Cloud
Log stringId - Specify flow log storage id, just set cls topic id.
- Cloud
Log stringRegion - Specify flow log storage region, default using current.
- Flow
Log stringDescription - Specify flow Log description.
- Flow
Log stringName - Specify flow log name.
- Flow
Log VpcStorage Flow Log Flow Log Storage Args - Specify consumer detail, required while
storage_type
isckafka
. - Resource
Id string - Specify resource unique Id of
resource_type
configured. - Resource
Type string - Specify resource type. NOTE: Only support
NETWORKINTERFACE
for now. Values:VPC
,SUBNET
,NETWORKINTERFACE
,CCN
,NAT
,DCG
. - Storage
Type string - Specify consumer type, values:
cls
,ckafka
. - map[string]string
- Tag description list.
- Traffic
Type string - Specify log traffic type, values:
ACCEPT
,REJECT
,ALL
. - Vpc
Flow stringLog Id - ID of the resource.
- Vpc
Id string - Specify vpc Id, ignore while
resource_type
isCCN
(unsupported) but required while other types.
- cloud
Log StringId - Specify flow log storage id, just set cls topic id.
- cloud
Log StringRegion - Specify flow log storage region, default using current.
- flow
Log StringDescription - Specify flow Log description.
- flow
Log StringName - Specify flow log name.
- flow
Log VpcStorage Flow Log Flow Log Storage - Specify consumer detail, required while
storage_type
isckafka
. - resource
Id String - Specify resource unique Id of
resource_type
configured. - resource
Type String - Specify resource type. NOTE: Only support
NETWORKINTERFACE
for now. Values:VPC
,SUBNET
,NETWORKINTERFACE
,CCN
,NAT
,DCG
. - storage
Type String - Specify consumer type, values:
cls
,ckafka
. - Map<String,String>
- Tag description list.
- traffic
Type String - Specify log traffic type, values:
ACCEPT
,REJECT
,ALL
. - vpc
Flow StringLog Id - ID of the resource.
- vpc
Id String - Specify vpc Id, ignore while
resource_type
isCCN
(unsupported) but required while other types.
- cloud
Log stringId - Specify flow log storage id, just set cls topic id.
- cloud
Log stringRegion - Specify flow log storage region, default using current.
- flow
Log stringDescription - Specify flow Log description.
- flow
Log stringName - Specify flow log name.
- flow
Log VpcStorage Flow Log Flow Log Storage - Specify consumer detail, required while
storage_type
isckafka
. - resource
Id string - Specify resource unique Id of
resource_type
configured. - resource
Type string - Specify resource type. NOTE: Only support
NETWORKINTERFACE
for now. Values:VPC
,SUBNET
,NETWORKINTERFACE
,CCN
,NAT
,DCG
. - storage
Type string - Specify consumer type, values:
cls
,ckafka
. - {[key: string]: string}
- Tag description list.
- traffic
Type string - Specify log traffic type, values:
ACCEPT
,REJECT
,ALL
. - vpc
Flow stringLog Id - ID of the resource.
- vpc
Id string - Specify vpc Id, ignore while
resource_type
isCCN
(unsupported) but required while other types.
- cloud_
log_ strid - Specify flow log storage id, just set cls topic id.
- cloud_
log_ strregion - Specify flow log storage region, default using current.
- flow_
log_ strdescription - Specify flow Log description.
- flow_
log_ strname - Specify flow log name.
- flow_
log_ Vpcstorage Flow Log Flow Log Storage Args - Specify consumer detail, required while
storage_type
isckafka
. - 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
. - Mapping[str, str]
- Tag description list.
- traffic_
type str - Specify log traffic type, values:
ACCEPT
,REJECT
,ALL
. - vpc_
flow_ strlog_ id - ID of the resource.
- vpc_
id str - Specify vpc Id, ignore while
resource_type
isCCN
(unsupported) but required while other types.
- cloud
Log StringId - Specify flow log storage id, just set cls topic id.
- cloud
Log StringRegion - Specify flow log storage region, default using current.
- flow
Log StringDescription - Specify flow Log description.
- flow
Log StringName - Specify flow log name.
- flow
Log Property MapStorage - Specify consumer detail, required while
storage_type
isckafka
. - resource
Id String - Specify resource unique Id of
resource_type
configured. - resource
Type String - Specify resource type. NOTE: Only support
NETWORKINTERFACE
for now. Values:VPC
,SUBNET
,NETWORKINTERFACE
,CCN
,NAT
,DCG
. - storage
Type String - Specify consumer type, values:
cls
,ckafka
. - Map<String>
- Tag description list.
- traffic
Type String - Specify log traffic type, values:
ACCEPT
,REJECT
,ALL
. - vpc
Flow StringLog Id - ID of the resource.
- vpc
Id String - Specify vpc Id, ignore while
resource_type
isCCN
(unsupported) but required while other types.
Supporting Types
VpcFlowLogFlowLogStorage, VpcFlowLogFlowLogStorageArgs
- Storage
Id string - Specify storage instance id, required while
storage_type
isckafka
. - Storage
Topic string - Specify storage topic id, required while
storage_type
isckafka
.
- Storage
Id string - Specify storage instance id, required while
storage_type
isckafka
. - Storage
Topic string - Specify storage topic id, required while
storage_type
isckafka
.
- storage
Id String - Specify storage instance id, required while
storage_type
isckafka
. - storage
Topic String - Specify storage topic id, required while
storage_type
isckafka
.
- storage
Id string - Specify storage instance id, required while
storage_type
isckafka
. - storage
Topic string - Specify storage topic id, required while
storage_type
isckafka
.
- storage_
id str - Specify storage instance id, required while
storage_type
isckafka
. - storage_
topic str - Specify storage topic id, required while
storage_type
isckafka
.
- storage
Id String - Specify storage instance id, required while
storage_type
isckafka
. - storage
Topic String - Specify storage topic id, required while
storage_type
isckafka
.
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.