1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. KubernetesControlPlaneLog
tencentcloud 1.82.68 published on Friday, Feb 6, 2026 by tencentcloudstack
tencentcloud logo
tencentcloud 1.82.68 published on Friday, Feb 6, 2026 by tencentcloudstack

    Provides a resource to create a TKE kubernetes control plane log

    Example Usage

    Use automatic creation of log_set_id and<span pulumi-lang-nodejs=" topicId

    " pulumi-lang-dotnet=" TopicId " pulumi-lang-go=" topicId " pulumi-lang-python=" topic_id " pulumi-lang-yaml=" topicId " pulumi-lang-java=" topicId “> topic_id

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.KubernetesControlPlaneLog("example", {
        clusterId: "cls-rng1h5ei",
        clusterType: "tke",
        components: {
            name: "karpenter",
            topicRegion: "ap-guangzhou",
        },
        deleteLogSetAndTopic: true,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.KubernetesControlPlaneLog("example",
        cluster_id="cls-rng1h5ei",
        cluster_type="tke",
        components={
            "name": "karpenter",
            "topic_region": "ap-guangzhou",
        },
        delete_log_set_and_topic=True)
    
    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 {
    		_, err := tencentcloud.NewKubernetesControlPlaneLog(ctx, "example", &tencentcloud.KubernetesControlPlaneLogArgs{
    			ClusterId:   pulumi.String("cls-rng1h5ei"),
    			ClusterType: pulumi.String("tke"),
    			Components: &tencentcloud.KubernetesControlPlaneLogComponentsArgs{
    				Name:        pulumi.String("karpenter"),
    				TopicRegion: pulumi.String("ap-guangzhou"),
    			},
    			DeleteLogSetAndTopic: pulumi.Bool(true),
    		})
    		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 example = new Tencentcloud.KubernetesControlPlaneLog("example", new()
        {
            ClusterId = "cls-rng1h5ei",
            ClusterType = "tke",
            Components = new Tencentcloud.Inputs.KubernetesControlPlaneLogComponentsArgs
            {
                Name = "karpenter",
                TopicRegion = "ap-guangzhou",
            },
            DeleteLogSetAndTopic = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.KubernetesControlPlaneLog;
    import com.pulumi.tencentcloud.KubernetesControlPlaneLogArgs;
    import com.pulumi.tencentcloud.inputs.KubernetesControlPlaneLogComponentsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new KubernetesControlPlaneLog("example", KubernetesControlPlaneLogArgs.builder()
                .clusterId("cls-rng1h5ei")
                .clusterType("tke")
                .components(KubernetesControlPlaneLogComponentsArgs.builder()
                    .name("karpenter")
                    .topicRegion("ap-guangzhou")
                    .build())
                .deleteLogSetAndTopic(true)
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:KubernetesControlPlaneLog
        properties:
          clusterId: cls-rng1h5ei
          clusterType: tke
          components:
            name: karpenter
            topicRegion: ap-guangzhou
          deleteLogSetAndTopic: true
    

    Use custom log_set_id and<span pulumi-lang-nodejs=” topicId

    " pulumi-lang-dotnet=" TopicId " pulumi-lang-go=" topicId " pulumi-lang-python=" topic_id " pulumi-lang-yaml=" topicId " pulumi-lang-java=" topicId “> topic_id

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.KubernetesControlPlaneLog("example", {
        clusterId: "cls-rng1h5ei",
        clusterType: "tke",
        components: {
            name: "cluster-autoscaler",
            logSetId: "40eed846-0f43-44b1-b216-c786a8970b1f",
            topicId: "21918a54-9ab4-40bc-90cd-c600cff00695",
            topicRegion: "ap-guangzhou",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.KubernetesControlPlaneLog("example",
        cluster_id="cls-rng1h5ei",
        cluster_type="tke",
        components={
            "name": "cluster-autoscaler",
            "log_set_id": "40eed846-0f43-44b1-b216-c786a8970b1f",
            "topic_id": "21918a54-9ab4-40bc-90cd-c600cff00695",
            "topic_region": "ap-guangzhou",
        })
    
    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 {
    		_, err := tencentcloud.NewKubernetesControlPlaneLog(ctx, "example", &tencentcloud.KubernetesControlPlaneLogArgs{
    			ClusterId:   pulumi.String("cls-rng1h5ei"),
    			ClusterType: pulumi.String("tke"),
    			Components: &tencentcloud.KubernetesControlPlaneLogComponentsArgs{
    				Name:        pulumi.String("cluster-autoscaler"),
    				LogSetId:    pulumi.String("40eed846-0f43-44b1-b216-c786a8970b1f"),
    				TopicId:     pulumi.String("21918a54-9ab4-40bc-90cd-c600cff00695"),
    				TopicRegion: pulumi.String("ap-guangzhou"),
    			},
    		})
    		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 example = new Tencentcloud.KubernetesControlPlaneLog("example", new()
        {
            ClusterId = "cls-rng1h5ei",
            ClusterType = "tke",
            Components = new Tencentcloud.Inputs.KubernetesControlPlaneLogComponentsArgs
            {
                Name = "cluster-autoscaler",
                LogSetId = "40eed846-0f43-44b1-b216-c786a8970b1f",
                TopicId = "21918a54-9ab4-40bc-90cd-c600cff00695",
                TopicRegion = "ap-guangzhou",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.KubernetesControlPlaneLog;
    import com.pulumi.tencentcloud.KubernetesControlPlaneLogArgs;
    import com.pulumi.tencentcloud.inputs.KubernetesControlPlaneLogComponentsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new KubernetesControlPlaneLog("example", KubernetesControlPlaneLogArgs.builder()
                .clusterId("cls-rng1h5ei")
                .clusterType("tke")
                .components(KubernetesControlPlaneLogComponentsArgs.builder()
                    .name("cluster-autoscaler")
                    .logSetId("40eed846-0f43-44b1-b216-c786a8970b1f")
                    .topicId("21918a54-9ab4-40bc-90cd-c600cff00695")
                    .topicRegion("ap-guangzhou")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:KubernetesControlPlaneLog
        properties:
          clusterId: cls-rng1h5ei
          clusterType: tke
          components:
            name: cluster-autoscaler
            logSetId: 40eed846-0f43-44b1-b216-c786a8970b1f
            topicId: 21918a54-9ab4-40bc-90cd-c600cff00695
            topicRegion: ap-guangzhou
    

    Create KubernetesControlPlaneLog Resource

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

    Constructor syntax

    new KubernetesControlPlaneLog(name: string, args: KubernetesControlPlaneLogArgs, opts?: CustomResourceOptions);
    @overload
    def KubernetesControlPlaneLog(resource_name: str,
                                  args: KubernetesControlPlaneLogArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def KubernetesControlPlaneLog(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  cluster_id: Optional[str] = None,
                                  cluster_type: Optional[str] = None,
                                  components: Optional[KubernetesControlPlaneLogComponentsArgs] = None,
                                  delete_log_set_and_topic: Optional[bool] = None,
                                  kubernetes_control_plane_log_id: Optional[str] = None)
    func NewKubernetesControlPlaneLog(ctx *Context, name string, args KubernetesControlPlaneLogArgs, opts ...ResourceOption) (*KubernetesControlPlaneLog, error)
    public KubernetesControlPlaneLog(string name, KubernetesControlPlaneLogArgs args, CustomResourceOptions? opts = null)
    public KubernetesControlPlaneLog(String name, KubernetesControlPlaneLogArgs args)
    public KubernetesControlPlaneLog(String name, KubernetesControlPlaneLogArgs args, CustomResourceOptions options)
    
    type: tencentcloud:KubernetesControlPlaneLog
    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 KubernetesControlPlaneLogArgs
    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 KubernetesControlPlaneLogArgs
    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 KubernetesControlPlaneLogArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KubernetesControlPlaneLogArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KubernetesControlPlaneLogArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ClusterId string
    Cluster ID.
    ClusterType string
    Cluster type. currently only support tke.
    Components KubernetesControlPlaneLogComponents
    Component name list. currently supports cluster-autoscaler, kapenter.
    DeleteLogSetAndTopic bool
    Whether to simultaneously delete the log set and topic. If the log set and topic are used by other collection rules, they will not be deleted. Default is false.
    KubernetesControlPlaneLogId string
    ID of the resource.
    ClusterId string
    Cluster ID.
    ClusterType string
    Cluster type. currently only support tke.
    Components KubernetesControlPlaneLogComponentsArgs
    Component name list. currently supports cluster-autoscaler, kapenter.
    DeleteLogSetAndTopic bool
    Whether to simultaneously delete the log set and topic. If the log set and topic are used by other collection rules, they will not be deleted. Default is false.
    KubernetesControlPlaneLogId string
    ID of the resource.
    clusterId String
    Cluster ID.
    clusterType String
    Cluster type. currently only support tke.
    components KubernetesControlPlaneLogComponents
    Component name list. currently supports cluster-autoscaler, kapenter.
    deleteLogSetAndTopic Boolean
    Whether to simultaneously delete the log set and topic. If the log set and topic are used by other collection rules, they will not be deleted. Default is false.
    kubernetesControlPlaneLogId String
    ID of the resource.
    clusterId string
    Cluster ID.
    clusterType string
    Cluster type. currently only support tke.
    components KubernetesControlPlaneLogComponents
    Component name list. currently supports cluster-autoscaler, kapenter.
    deleteLogSetAndTopic boolean
    Whether to simultaneously delete the log set and topic. If the log set and topic are used by other collection rules, they will not be deleted. Default is false.
    kubernetesControlPlaneLogId string
    ID of the resource.
    cluster_id str
    Cluster ID.
    cluster_type str
    Cluster type. currently only support tke.
    components KubernetesControlPlaneLogComponentsArgs
    Component name list. currently supports cluster-autoscaler, kapenter.
    delete_log_set_and_topic bool
    Whether to simultaneously delete the log set and topic. If the log set and topic are used by other collection rules, they will not be deleted. Default is false.
    kubernetes_control_plane_log_id str
    ID of the resource.
    clusterId String
    Cluster ID.
    clusterType String
    Cluster type. currently only support tke.
    components Property Map
    Component name list. currently supports cluster-autoscaler, kapenter.
    deleteLogSetAndTopic Boolean
    Whether to simultaneously delete the log set and topic. If the log set and topic are used by other collection rules, they will not be deleted. Default is false.
    kubernetesControlPlaneLogId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the KubernetesControlPlaneLog 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 KubernetesControlPlaneLog Resource

    Get an existing KubernetesControlPlaneLog 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?: KubernetesControlPlaneLogState, opts?: CustomResourceOptions): KubernetesControlPlaneLog
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            cluster_type: Optional[str] = None,
            components: Optional[KubernetesControlPlaneLogComponentsArgs] = None,
            delete_log_set_and_topic: Optional[bool] = None,
            kubernetes_control_plane_log_id: Optional[str] = None) -> KubernetesControlPlaneLog
    func GetKubernetesControlPlaneLog(ctx *Context, name string, id IDInput, state *KubernetesControlPlaneLogState, opts ...ResourceOption) (*KubernetesControlPlaneLog, error)
    public static KubernetesControlPlaneLog Get(string name, Input<string> id, KubernetesControlPlaneLogState? state, CustomResourceOptions? opts = null)
    public static KubernetesControlPlaneLog get(String name, Output<String> id, KubernetesControlPlaneLogState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:KubernetesControlPlaneLog    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:
    ClusterId string
    Cluster ID.
    ClusterType string
    Cluster type. currently only support tke.
    Components KubernetesControlPlaneLogComponents
    Component name list. currently supports cluster-autoscaler, kapenter.
    DeleteLogSetAndTopic bool
    Whether to simultaneously delete the log set and topic. If the log set and topic are used by other collection rules, they will not be deleted. Default is false.
    KubernetesControlPlaneLogId string
    ID of the resource.
    ClusterId string
    Cluster ID.
    ClusterType string
    Cluster type. currently only support tke.
    Components KubernetesControlPlaneLogComponentsArgs
    Component name list. currently supports cluster-autoscaler, kapenter.
    DeleteLogSetAndTopic bool
    Whether to simultaneously delete the log set and topic. If the log set and topic are used by other collection rules, they will not be deleted. Default is false.
    KubernetesControlPlaneLogId string
    ID of the resource.
    clusterId String
    Cluster ID.
    clusterType String
    Cluster type. currently only support tke.
    components KubernetesControlPlaneLogComponents
    Component name list. currently supports cluster-autoscaler, kapenter.
    deleteLogSetAndTopic Boolean
    Whether to simultaneously delete the log set and topic. If the log set and topic are used by other collection rules, they will not be deleted. Default is false.
    kubernetesControlPlaneLogId String
    ID of the resource.
    clusterId string
    Cluster ID.
    clusterType string
    Cluster type. currently only support tke.
    components KubernetesControlPlaneLogComponents
    Component name list. currently supports cluster-autoscaler, kapenter.
    deleteLogSetAndTopic boolean
    Whether to simultaneously delete the log set and topic. If the log set and topic are used by other collection rules, they will not be deleted. Default is false.
    kubernetesControlPlaneLogId string
    ID of the resource.
    cluster_id str
    Cluster ID.
    cluster_type str
    Cluster type. currently only support tke.
    components KubernetesControlPlaneLogComponentsArgs
    Component name list. currently supports cluster-autoscaler, kapenter.
    delete_log_set_and_topic bool
    Whether to simultaneously delete the log set and topic. If the log set and topic are used by other collection rules, they will not be deleted. Default is false.
    kubernetes_control_plane_log_id str
    ID of the resource.
    clusterId String
    Cluster ID.
    clusterType String
    Cluster type. currently only support tke.
    components Property Map
    Component name list. currently supports cluster-autoscaler, kapenter.
    deleteLogSetAndTopic Boolean
    Whether to simultaneously delete the log set and topic. If the log set and topic are used by other collection rules, they will not be deleted. Default is false.
    kubernetesControlPlaneLogId String
    ID of the resource.

    Supporting Types

    KubernetesControlPlaneLogComponents, KubernetesControlPlaneLogComponentsArgs

    Name string
    Component name.
    LogLevel double
    It has been deprecated from version 1.82.54. Log level. for components that support dynamic adjustment, you can specify this parameter when enabling logs.

    Deprecated: Deprecated

    LogSetId string
    Logset ID. if not specified, auto-create.
    TopicId string
    Log topic ID. if not specified, auto-create.
    TopicRegion string
    topic region. this parameter enables cross-region shipping of logs.
    Name string
    Component name.
    LogLevel float64
    It has been deprecated from version 1.82.54. Log level. for components that support dynamic adjustment, you can specify this parameter when enabling logs.

    Deprecated: Deprecated

    LogSetId string
    Logset ID. if not specified, auto-create.
    TopicId string
    Log topic ID. if not specified, auto-create.
    TopicRegion string
    topic region. this parameter enables cross-region shipping of logs.
    name String
    Component name.
    logLevel Double
    It has been deprecated from version 1.82.54. Log level. for components that support dynamic adjustment, you can specify this parameter when enabling logs.

    Deprecated: Deprecated

    logSetId String
    Logset ID. if not specified, auto-create.
    topicId String
    Log topic ID. if not specified, auto-create.
    topicRegion String
    topic region. this parameter enables cross-region shipping of logs.
    name string
    Component name.
    logLevel number
    It has been deprecated from version 1.82.54. Log level. for components that support dynamic adjustment, you can specify this parameter when enabling logs.

    Deprecated: Deprecated

    logSetId string
    Logset ID. if not specified, auto-create.
    topicId string
    Log topic ID. if not specified, auto-create.
    topicRegion string
    topic region. this parameter enables cross-region shipping of logs.
    name str
    Component name.
    log_level float
    It has been deprecated from version 1.82.54. Log level. for components that support dynamic adjustment, you can specify this parameter when enabling logs.

    Deprecated: Deprecated

    log_set_id str
    Logset ID. if not specified, auto-create.
    topic_id str
    Log topic ID. if not specified, auto-create.
    topic_region str
    topic region. this parameter enables cross-region shipping of logs.
    name String
    Component name.
    logLevel Number
    It has been deprecated from version 1.82.54. Log level. for components that support dynamic adjustment, you can specify this parameter when enabling logs.

    Deprecated: Deprecated

    logSetId String
    Logset ID. if not specified, auto-create.
    topicId String
    Log topic ID. if not specified, auto-create.
    topicRegion String
    topic region. this parameter enables cross-region shipping of logs.

    Import

    TKE kubernetes control plane log can be imported using the clusterId#clusterType#componentName, e.g.

    $ pulumi import tencentcloud:index/kubernetesControlPlaneLog:KubernetesControlPlaneLog example cls-rng1h5ei#tke#cluster-autoscaler
    

    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.82.68 published on Friday, Feb 6, 2026 by tencentcloudstack
      Meet Neo: Your AI Platform Teammate