tencentcloud.TcmTracingConfig
Explore with Pulumi AI
Provides a resource to create a tcm tracing_config
NOTE: If you use the config attribute tracing in tencentcloud_tcm_mesh, do not use tencentcloud.TcmTracingConfig
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const tracingConfig = new tencentcloud.TcmTracingConfig("tracingConfig", {
apm: {
enable: true,
instanceId: "apm-xxx",
region: "ap-guangzhou",
},
enable: true,
meshId: "mesh-xxxxxxxx",
sampling: 1,
zipkin: {
address: "10.10.10.10:9411",
},
});
const deleteConfig = new tencentcloud.TcmTracingConfig("deleteConfig", {
apm: {
enable: false,
},
enable: true,
meshId: "mesh-rofjmxxx",
sampling: 0,
zipkin: {
address: "",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
tracing_config = tencentcloud.TcmTracingConfig("tracingConfig",
apm={
"enable": True,
"instance_id": "apm-xxx",
"region": "ap-guangzhou",
},
enable=True,
mesh_id="mesh-xxxxxxxx",
sampling=1,
zipkin={
"address": "10.10.10.10:9411",
})
delete_config = tencentcloud.TcmTracingConfig("deleteConfig",
apm={
"enable": False,
},
enable=True,
mesh_id="mesh-rofjmxxx",
sampling=0,
zipkin={
"address": "",
})
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.NewTcmTracingConfig(ctx, "tracingConfig", &tencentcloud.TcmTracingConfigArgs{
Apm: &tencentcloud.TcmTracingConfigApmArgs{
Enable: pulumi.Bool(true),
InstanceId: pulumi.String("apm-xxx"),
Region: pulumi.String("ap-guangzhou"),
},
Enable: pulumi.Bool(true),
MeshId: pulumi.String("mesh-xxxxxxxx"),
Sampling: pulumi.Float64(1),
Zipkin: &tencentcloud.TcmTracingConfigZipkinArgs{
Address: pulumi.String("10.10.10.10:9411"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewTcmTracingConfig(ctx, "deleteConfig", &tencentcloud.TcmTracingConfigArgs{
Apm: &tencentcloud.TcmTracingConfigApmArgs{
Enable: pulumi.Bool(false),
},
Enable: pulumi.Bool(true),
MeshId: pulumi.String("mesh-rofjmxxx"),
Sampling: pulumi.Float64(0),
Zipkin: &tencentcloud.TcmTracingConfigZipkinArgs{
Address: pulumi.String(""),
},
})
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 tracingConfig = new Tencentcloud.TcmTracingConfig("tracingConfig", new()
{
Apm = new Tencentcloud.Inputs.TcmTracingConfigApmArgs
{
Enable = true,
InstanceId = "apm-xxx",
Region = "ap-guangzhou",
},
Enable = true,
MeshId = "mesh-xxxxxxxx",
Sampling = 1,
Zipkin = new Tencentcloud.Inputs.TcmTracingConfigZipkinArgs
{
Address = "10.10.10.10:9411",
},
});
var deleteConfig = new Tencentcloud.TcmTracingConfig("deleteConfig", new()
{
Apm = new Tencentcloud.Inputs.TcmTracingConfigApmArgs
{
Enable = false,
},
Enable = true,
MeshId = "mesh-rofjmxxx",
Sampling = 0,
Zipkin = new Tencentcloud.Inputs.TcmTracingConfigZipkinArgs
{
Address = "",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TcmTracingConfig;
import com.pulumi.tencentcloud.TcmTracingConfigArgs;
import com.pulumi.tencentcloud.inputs.TcmTracingConfigApmArgs;
import com.pulumi.tencentcloud.inputs.TcmTracingConfigZipkinArgs;
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 tracingConfig = new TcmTracingConfig("tracingConfig", TcmTracingConfigArgs.builder()
.apm(TcmTracingConfigApmArgs.builder()
.enable(true)
.instanceId("apm-xxx")
.region("ap-guangzhou")
.build())
.enable(true)
.meshId("mesh-xxxxxxxx")
.sampling(1)
.zipkin(TcmTracingConfigZipkinArgs.builder()
.address("10.10.10.10:9411")
.build())
.build());
var deleteConfig = new TcmTracingConfig("deleteConfig", TcmTracingConfigArgs.builder()
.apm(TcmTracingConfigApmArgs.builder()
.enable(false)
.build())
.enable(true)
.meshId("mesh-rofjmxxx")
.sampling(0)
.zipkin(TcmTracingConfigZipkinArgs.builder()
.address("")
.build())
.build());
}
}
resources:
tracingConfig:
type: tencentcloud:TcmTracingConfig
properties:
apm:
enable: true
instanceId: apm-xxx
region: ap-guangzhou
enable: true
meshId: mesh-xxxxxxxx
sampling: 1
zipkin:
address: 10.10.10.10:9411
deleteConfig:
type: tencentcloud:TcmTracingConfig
properties:
apm:
enable: false
enable: true
meshId: mesh-rofjmxxx
sampling: 0
zipkin:
address: ""
Create TcmTracingConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TcmTracingConfig(name: string, args: TcmTracingConfigArgs, opts?: CustomResourceOptions);
@overload
def TcmTracingConfig(resource_name: str,
args: TcmTracingConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TcmTracingConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
mesh_id: Optional[str] = None,
apm: Optional[TcmTracingConfigApmArgs] = None,
enable: Optional[bool] = None,
sampling: Optional[float] = None,
tcm_tracing_config_id: Optional[str] = None,
zipkin: Optional[TcmTracingConfigZipkinArgs] = None)
func NewTcmTracingConfig(ctx *Context, name string, args TcmTracingConfigArgs, opts ...ResourceOption) (*TcmTracingConfig, error)
public TcmTracingConfig(string name, TcmTracingConfigArgs args, CustomResourceOptions? opts = null)
public TcmTracingConfig(String name, TcmTracingConfigArgs args)
public TcmTracingConfig(String name, TcmTracingConfigArgs args, CustomResourceOptions options)
type: tencentcloud:TcmTracingConfig
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 TcmTracingConfigArgs
- 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 TcmTracingConfigArgs
- 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 TcmTracingConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TcmTracingConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TcmTracingConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TcmTracingConfig 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 TcmTracingConfig resource accepts the following input properties:
- Mesh
Id string - Mesh ID.
- Apm
Tcm
Tracing Config Apm - APM config.
- Enable bool
- Whether enable tracing.
- Sampling double
- Tracing sampling, 0.0-1.0.
- Tcm
Tracing stringConfig Id - ID of the resource.
- Zipkin
Tcm
Tracing Config Zipkin - Third party zipkin config.
- Mesh
Id string - Mesh ID.
- Apm
Tcm
Tracing Config Apm Args - APM config.
- Enable bool
- Whether enable tracing.
- Sampling float64
- Tracing sampling, 0.0-1.0.
- Tcm
Tracing stringConfig Id - ID of the resource.
- Zipkin
Tcm
Tracing Config Zipkin Args - Third party zipkin config.
- mesh
Id String - Mesh ID.
- apm
Tcm
Tracing Config Apm - APM config.
- enable Boolean
- Whether enable tracing.
- sampling Double
- Tracing sampling, 0.0-1.0.
- tcm
Tracing StringConfig Id - ID of the resource.
- zipkin
Tcm
Tracing Config Zipkin - Third party zipkin config.
- mesh
Id string - Mesh ID.
- apm
Tcm
Tracing Config Apm - APM config.
- enable boolean
- Whether enable tracing.
- sampling number
- Tracing sampling, 0.0-1.0.
- tcm
Tracing stringConfig Id - ID of the resource.
- zipkin
Tcm
Tracing Config Zipkin - Third party zipkin config.
- mesh_
id str - Mesh ID.
- apm
Tcm
Tracing Config Apm Args - APM config.
- enable bool
- Whether enable tracing.
- sampling float
- Tracing sampling, 0.0-1.0.
- tcm_
tracing_ strconfig_ id - ID of the resource.
- zipkin
Tcm
Tracing Config Zipkin Args - Third party zipkin config.
- mesh
Id String - Mesh ID.
- apm Property Map
- APM config.
- enable Boolean
- Whether enable tracing.
- sampling Number
- Tracing sampling, 0.0-1.0.
- tcm
Tracing StringConfig Id - ID of the resource.
- zipkin Property Map
- Third party zipkin config.
Outputs
All input properties are implicitly available as output properties. Additionally, the TcmTracingConfig 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 TcmTracingConfig Resource
Get an existing TcmTracingConfig 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?: TcmTracingConfigState, opts?: CustomResourceOptions): TcmTracingConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
apm: Optional[TcmTracingConfigApmArgs] = None,
enable: Optional[bool] = None,
mesh_id: Optional[str] = None,
sampling: Optional[float] = None,
tcm_tracing_config_id: Optional[str] = None,
zipkin: Optional[TcmTracingConfigZipkinArgs] = None) -> TcmTracingConfig
func GetTcmTracingConfig(ctx *Context, name string, id IDInput, state *TcmTracingConfigState, opts ...ResourceOption) (*TcmTracingConfig, error)
public static TcmTracingConfig Get(string name, Input<string> id, TcmTracingConfigState? state, CustomResourceOptions? opts = null)
public static TcmTracingConfig get(String name, Output<String> id, TcmTracingConfigState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TcmTracingConfig 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.
- Apm
Tcm
Tracing Config Apm - APM config.
- Enable bool
- Whether enable tracing.
- Mesh
Id string - Mesh ID.
- Sampling double
- Tracing sampling, 0.0-1.0.
- Tcm
Tracing stringConfig Id - ID of the resource.
- Zipkin
Tcm
Tracing Config Zipkin - Third party zipkin config.
- Apm
Tcm
Tracing Config Apm Args - APM config.
- Enable bool
- Whether enable tracing.
- Mesh
Id string - Mesh ID.
- Sampling float64
- Tracing sampling, 0.0-1.0.
- Tcm
Tracing stringConfig Id - ID of the resource.
- Zipkin
Tcm
Tracing Config Zipkin Args - Third party zipkin config.
- apm
Tcm
Tracing Config Apm - APM config.
- enable Boolean
- Whether enable tracing.
- mesh
Id String - Mesh ID.
- sampling Double
- Tracing sampling, 0.0-1.0.
- tcm
Tracing StringConfig Id - ID of the resource.
- zipkin
Tcm
Tracing Config Zipkin - Third party zipkin config.
- apm
Tcm
Tracing Config Apm - APM config.
- enable boolean
- Whether enable tracing.
- mesh
Id string - Mesh ID.
- sampling number
- Tracing sampling, 0.0-1.0.
- tcm
Tracing stringConfig Id - ID of the resource.
- zipkin
Tcm
Tracing Config Zipkin - Third party zipkin config.
- apm
Tcm
Tracing Config Apm Args - APM config.
- enable bool
- Whether enable tracing.
- mesh_
id str - Mesh ID.
- sampling float
- Tracing sampling, 0.0-1.0.
- tcm_
tracing_ strconfig_ id - ID of the resource.
- zipkin
Tcm
Tracing Config Zipkin Args - Third party zipkin config.
- apm Property Map
- APM config.
- enable Boolean
- Whether enable tracing.
- mesh
Id String - Mesh ID.
- sampling Number
- Tracing sampling, 0.0-1.0.
- tcm
Tracing StringConfig Id - ID of the resource.
- zipkin Property Map
- Third party zipkin config.
Supporting Types
TcmTracingConfigApm, TcmTracingConfigApmArgs
- Enable bool
- Whether enable APM.
- Instance
Id string - Instance id of the APM.
- Region string
- Region.
- Enable bool
- Whether enable APM.
- Instance
Id string - Instance id of the APM.
- Region string
- Region.
- enable Boolean
- Whether enable APM.
- instance
Id String - Instance id of the APM.
- region String
- Region.
- enable boolean
- Whether enable APM.
- instance
Id string - Instance id of the APM.
- region string
- Region.
- enable bool
- Whether enable APM.
- instance_
id str - Instance id of the APM.
- region str
- Region.
- enable Boolean
- Whether enable APM.
- instance
Id String - Instance id of the APM.
- region String
- Region.
TcmTracingConfigZipkin, TcmTracingConfigZipkinArgs
- Address string
- Zipkin address.
- Address string
- Zipkin address.
- address String
- Zipkin address.
- address string
- Zipkin address.
- address str
- Zipkin address.
- address String
- Zipkin address.
Import
tcm tracing_config can be imported using the mesh_id, e.g.
$ pulumi import tencentcloud:index/tcmTracingConfig:TcmTracingConfig tracing_config mesh-rofjmxxx
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.