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:
- Cluster
Id string - Cluster ID.
- Cluster
Type string - Cluster type. currently only support tke.
- Components
Kubernetes
Control Plane Log Components - Component name list. currently supports cluster-autoscaler, kapenter.
- Delete
Log boolSet And Topic - 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 stringPlane Log Id - ID of the resource.
- Cluster
Id string - Cluster ID.
- Cluster
Type string - Cluster type. currently only support tke.
- Components
Kubernetes
Control Plane Log Components Args - Component name list. currently supports cluster-autoscaler, kapenter.
- Delete
Log boolSet And Topic - 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 stringPlane Log Id - ID of the resource.
- cluster
Id String - Cluster ID.
- cluster
Type String - Cluster type. currently only support tke.
- components
Kubernetes
Control Plane Log Components - Component name list. currently supports cluster-autoscaler, kapenter.
- delete
Log BooleanSet And Topic - 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 StringPlane Log Id - ID of the resource.
- cluster
Id string - Cluster ID.
- cluster
Type string - Cluster type. currently only support tke.
- components
Kubernetes
Control Plane Log Components - Component name list. currently supports cluster-autoscaler, kapenter.
- delete
Log booleanSet And Topic - 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 stringPlane Log Id - ID of the resource.
- cluster_
id str - Cluster ID.
- cluster_
type str - Cluster type. currently only support tke.
- components
Kubernetes
Control Plane Log Components Args - Component name list. currently supports cluster-autoscaler, kapenter.
- delete_
log_ boolset_ and_ topic - 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_ strplane_ log_ id - ID of the resource.
- cluster
Id String - Cluster ID.
- cluster
Type String - Cluster type. currently only support tke.
- components Property Map
- Component name list. currently supports cluster-autoscaler, kapenter.
- delete
Log BooleanSet And Topic - 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 StringPlane Log Id - 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) -> KubernetesControlPlaneLogfunc 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.
- Cluster
Id string - Cluster ID.
- Cluster
Type string - Cluster type. currently only support tke.
- Components
Kubernetes
Control Plane Log Components - Component name list. currently supports cluster-autoscaler, kapenter.
- Delete
Log boolSet And Topic - 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 stringPlane Log Id - ID of the resource.
- Cluster
Id string - Cluster ID.
- Cluster
Type string - Cluster type. currently only support tke.
- Components
Kubernetes
Control Plane Log Components Args - Component name list. currently supports cluster-autoscaler, kapenter.
- Delete
Log boolSet And Topic - 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 stringPlane Log Id - ID of the resource.
- cluster
Id String - Cluster ID.
- cluster
Type String - Cluster type. currently only support tke.
- components
Kubernetes
Control Plane Log Components - Component name list. currently supports cluster-autoscaler, kapenter.
- delete
Log BooleanSet And Topic - 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 StringPlane Log Id - ID of the resource.
- cluster
Id string - Cluster ID.
- cluster
Type string - Cluster type. currently only support tke.
- components
Kubernetes
Control Plane Log Components - Component name list. currently supports cluster-autoscaler, kapenter.
- delete
Log booleanSet And Topic - 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 stringPlane Log Id - ID of the resource.
- cluster_
id str - Cluster ID.
- cluster_
type str - Cluster type. currently only support tke.
- components
Kubernetes
Control Plane Log Components Args - Component name list. currently supports cluster-autoscaler, kapenter.
- delete_
log_ boolset_ and_ topic - 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_ strplane_ log_ id - ID of the resource.
- cluster
Id String - Cluster ID.
- cluster
Type String - Cluster type. currently only support tke.
- components Property Map
- Component name list. currently supports cluster-autoscaler, kapenter.
- delete
Log BooleanSet And Topic - 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 StringPlane Log Id - ID of the resource.
Supporting Types
KubernetesControlPlaneLogComponents, KubernetesControlPlaneLogComponentsArgs
- Name string
- Component name.
- Log
Level 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.
- Log
Set stringId - Logset ID. if not specified, auto-create.
- Topic
Id string - Log topic ID. if not specified, auto-create.
- Topic
Region string - topic region. this parameter enables cross-region shipping of logs.
- Name string
- Component name.
- Log
Level 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.
- Log
Set stringId - Logset ID. if not specified, auto-create.
- Topic
Id string - Log topic ID. if not specified, auto-create.
- Topic
Region string - topic region. this parameter enables cross-region shipping of logs.
- name String
- Component name.
- log
Level 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.
- log
Set StringId - Logset ID. if not specified, auto-create.
- topic
Id String - Log topic ID. if not specified, auto-create.
- topic
Region String - topic region. this parameter enables cross-region shipping of logs.
- name string
- Component name.
- log
Level 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.
- log
Set stringId - Logset ID. if not specified, auto-create.
- topic
Id string - Log topic ID. if not specified, auto-create.
- topic
Region 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.
- log_
set_ strid - 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.
- log
Level 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.
- log
Set StringId - Logset ID. if not specified, auto-create.
- topic
Id String - Log topic ID. if not specified, auto-create.
- topic
Region 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
tencentcloudTerraform Provider.
