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

tencentcloud.ClickhouseInstance

Explore with Pulumi AI

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

    Provides a resource to create a clickhouse instance.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-6";
    const spec = tencentcloud.getClickhouseSpec({
        zone: availabilityZone,
        payMode: "POSTPAID_BY_HOUR",
        isElastic: false,
    });
    const dataSpec = spec.then(spec => .filter(i => i["cpu"] == 4 && i["mem"] == 16).map(i => (i)));
    const dataSpecName4c16m = dataSpec[0].name;
    const commonSpec = spec.then(spec => .filter(i => i["cpu"] == 4 && i["mem"] == 16).map(i => (i)));
    const commonSpecName4c16m = commonSpec[0].name;
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    const subnet = new tencentcloud.Subnet("subnet", {
        vpcId: vpc.vpcId,
        cidrBlock: "10.0.0.0/16",
        availabilityZone: availabilityZone,
        isMulticast: false,
    });
    const cdwchInstance = new tencentcloud.ClickhouseInstance("cdwchInstance", {
        zone: availabilityZone,
        haFlag: true,
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        productVersion: "21.8.12.29",
        dataSpec: {
            specName: dataSpecName4c16m,
            count: 2,
            diskSize: 300,
        },
        commonSpec: {
            specName: commonSpecName4c16m,
            count: 3,
            diskSize: 300,
        },
        chargeType: "POSTPAID_BY_HOUR",
        instanceName: "tf-test-clickhouse",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-6"
    spec = tencentcloud.get_clickhouse_spec(zone=availability_zone,
        pay_mode="POSTPAID_BY_HOUR",
        is_elastic=False)
    data_spec = [i for i in spec.data_specs if i["cpu"] == 4 and i["mem"] == 16]
    data_spec_name4c16m = data_spec[0].name
    common_spec = [i for i in spec.common_specs if i["cpu"] == 4 and i["mem"] == 16]
    common_spec_name4c16m = common_spec[0].name
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    subnet = tencentcloud.Subnet("subnet",
        vpc_id=vpc.vpc_id,
        cidr_block="10.0.0.0/16",
        availability_zone=availability_zone,
        is_multicast=False)
    cdwch_instance = tencentcloud.ClickhouseInstance("cdwchInstance",
        zone=availability_zone,
        ha_flag=True,
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        product_version="21.8.12.29",
        data_spec={
            "spec_name": data_spec_name4c16m,
            "count": 2,
            "disk_size": 300,
        },
        common_spec={
            "spec_name": common_spec_name4c16m,
            "count": 3,
            "disk_size": 300,
        },
        charge_type="POSTPAID_BY_HOUR",
        instance_name="tf-test-clickhouse")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		availabilityZone := "ap-guangzhou-6"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		spec, err := tencentcloud.GetClickhouseSpec(ctx, &tencentcloud.GetClickhouseSpecArgs{
    			Zone:      availabilityZone,
    			PayMode:   pulumi.StringRef("POSTPAID_BY_HOUR"),
    			IsElastic: pulumi.BoolRef(false),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		dataSpec := "TODO: For expression"
    		dataSpecName4c16m := dataSpec[0].Name
    		commonSpec := "TODO: For expression"
    		commonSpecName4c16m := commonSpec[0].Name
    		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{
    			VpcId:            vpc.VpcId,
    			CidrBlock:        pulumi.String("10.0.0.0/16"),
    			AvailabilityZone: pulumi.String(availabilityZone),
    			IsMulticast:      pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewClickhouseInstance(ctx, "cdwchInstance", &tencentcloud.ClickhouseInstanceArgs{
    			Zone:           pulumi.String(availabilityZone),
    			HaFlag:         pulumi.Bool(true),
    			VpcId:          vpc.VpcId,
    			SubnetId:       subnet.SubnetId,
    			ProductVersion: pulumi.String("21.8.12.29"),
    			DataSpec: &tencentcloud.ClickhouseInstanceDataSpecArgs{
    				SpecName: pulumi.String(dataSpecName4c16m),
    				Count:    pulumi.Float64(2),
    				DiskSize: pulumi.Float64(300),
    			},
    			CommonSpec: &tencentcloud.ClickhouseInstanceCommonSpecArgs{
    				SpecName: pulumi.String(commonSpecName4c16m),
    				Count:    pulumi.Float64(3),
    				DiskSize: pulumi.Float64(300),
    			},
    			ChargeType:   pulumi.String("POSTPAID_BY_HOUR"),
    			InstanceName: pulumi.String("tf-test-clickhouse"),
    		})
    		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 config = new Config();
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-6";
        var spec = Tencentcloud.GetClickhouseSpec.Invoke(new()
        {
            Zone = availabilityZone,
            PayMode = "POSTPAID_BY_HOUR",
            IsElastic = false,
        });
    
        var dataSpec = .Where(i => i["cpu"] == 4 && i["mem"] == 16).Select(i => 
        {
            return i;
        }).ToList();
    
        var dataSpecName4c16m = dataSpec[0].Name;
    
        var commonSpec = .Where(i => i["cpu"] == 4 && i["mem"] == 16).Select(i => 
        {
            return i;
        }).ToList();
    
        var commonSpecName4c16m = commonSpec[0].Name;
    
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            VpcId = vpc.VpcId,
            CidrBlock = "10.0.0.0/16",
            AvailabilityZone = availabilityZone,
            IsMulticast = false,
        });
    
        var cdwchInstance = new Tencentcloud.ClickhouseInstance("cdwchInstance", new()
        {
            Zone = availabilityZone,
            HaFlag = true,
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            ProductVersion = "21.8.12.29",
            DataSpec = new Tencentcloud.Inputs.ClickhouseInstanceDataSpecArgs
            {
                SpecName = dataSpecName4c16m,
                Count = 2,
                DiskSize = 300,
            },
            CommonSpec = new Tencentcloud.Inputs.ClickhouseInstanceCommonSpecArgs
            {
                SpecName = commonSpecName4c16m,
                Count = 3,
                DiskSize = 300,
            },
            ChargeType = "POSTPAID_BY_HOUR",
            InstanceName = "tf-test-clickhouse",
        });
    
    });
    
    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.GetClickhouseSpecArgs;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Subnet;
    import com.pulumi.tencentcloud.SubnetArgs;
    import com.pulumi.tencentcloud.ClickhouseInstance;
    import com.pulumi.tencentcloud.ClickhouseInstanceArgs;
    import com.pulumi.tencentcloud.inputs.ClickhouseInstanceDataSpecArgs;
    import com.pulumi.tencentcloud.inputs.ClickhouseInstanceCommonSpecArgs;
    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 config = ctx.config();
            final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-6");
            final var spec = TencentcloudFunctions.getClickhouseSpec(GetClickhouseSpecArgs.builder()
                .zone(availabilityZone)
                .payMode("POSTPAID_BY_HOUR")
                .isElastic(false)
                .build());
    
            final var dataSpec = "TODO: ForExpression";
    
            final var dataSpecName4c16m = dataSpec[0].name();
    
            final var commonSpec = "TODO: ForExpression";
    
            final var commonSpecName4c16m = commonSpec[0].name();
    
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .vpcId(vpc.vpcId())
                .cidrBlock("10.0.0.0/16")
                .availabilityZone(availabilityZone)
                .isMulticast(false)
                .build());
    
            var cdwchInstance = new ClickhouseInstance("cdwchInstance", ClickhouseInstanceArgs.builder()
                .zone(availabilityZone)
                .haFlag(true)
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .productVersion("21.8.12.29")
                .dataSpec(ClickhouseInstanceDataSpecArgs.builder()
                    .specName(dataSpecName4c16m)
                    .count(2)
                    .diskSize(300)
                    .build())
                .commonSpec(ClickhouseInstanceCommonSpecArgs.builder()
                    .specName(commonSpecName4c16m)
                    .count(3)
                    .diskSize(300)
                    .build())
                .chargeType("POSTPAID_BY_HOUR")
                .instanceName("tf-test-clickhouse")
                .build());
    
        }
    }
    
    Coming soon!
    

    PREPAID instance

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-6";
    const spec = tencentcloud.getClickhouseSpec({
        zone: availabilityZone,
        payMode: "POSTPAID_BY_HOUR",
        isElastic: false,
    });
    const dataSpec = spec.then(spec => .filter(i => i["cpu"] == 4 && i["mem"] == 16).map(i => (i)));
    const dataSpecName4c16m = dataSpec[0].name;
    const commonSpec = spec.then(spec => .filter(i => i["cpu"] == 4 && i["mem"] == 16).map(i => (i)));
    const commonSpecName4c16m = commonSpec[0].name;
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    const subnet = new tencentcloud.Subnet("subnet", {
        vpcId: vpc.vpcId,
        cidrBlock: "10.0.0.0/16",
        availabilityZone: availabilityZone,
        isMulticast: false,
    });
    const cdwchInstancePrepaid = new tencentcloud.ClickhouseInstance("cdwchInstancePrepaid", {
        zone: availabilityZone,
        haFlag: true,
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        productVersion: "21.8.12.29",
        dataSpec: {
            specName: dataSpecName4c16m,
            count: 2,
            diskSize: 300,
        },
        commonSpec: {
            specName: commonSpecName4c16m,
            count: 3,
            diskSize: 300,
        },
        chargeType: "PREPAID",
        renewFlag: 1,
        timeSpan: 1,
        instanceName: "tf-test-clickhouse-prepaid",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-6"
    spec = tencentcloud.get_clickhouse_spec(zone=availability_zone,
        pay_mode="POSTPAID_BY_HOUR",
        is_elastic=False)
    data_spec = [i for i in spec.data_specs if i["cpu"] == 4 and i["mem"] == 16]
    data_spec_name4c16m = data_spec[0].name
    common_spec = [i for i in spec.common_specs if i["cpu"] == 4 and i["mem"] == 16]
    common_spec_name4c16m = common_spec[0].name
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    subnet = tencentcloud.Subnet("subnet",
        vpc_id=vpc.vpc_id,
        cidr_block="10.0.0.0/16",
        availability_zone=availability_zone,
        is_multicast=False)
    cdwch_instance_prepaid = tencentcloud.ClickhouseInstance("cdwchInstancePrepaid",
        zone=availability_zone,
        ha_flag=True,
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        product_version="21.8.12.29",
        data_spec={
            "spec_name": data_spec_name4c16m,
            "count": 2,
            "disk_size": 300,
        },
        common_spec={
            "spec_name": common_spec_name4c16m,
            "count": 3,
            "disk_size": 300,
        },
        charge_type="PREPAID",
        renew_flag=1,
        time_span=1,
        instance_name="tf-test-clickhouse-prepaid")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		availabilityZone := "ap-guangzhou-6"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		spec, err := tencentcloud.GetClickhouseSpec(ctx, &tencentcloud.GetClickhouseSpecArgs{
    			Zone:      availabilityZone,
    			PayMode:   pulumi.StringRef("POSTPAID_BY_HOUR"),
    			IsElastic: pulumi.BoolRef(false),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		dataSpec := "TODO: For expression"
    		dataSpecName4c16m := dataSpec[0].Name
    		commonSpec := "TODO: For expression"
    		commonSpecName4c16m := commonSpec[0].Name
    		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{
    			VpcId:            vpc.VpcId,
    			CidrBlock:        pulumi.String("10.0.0.0/16"),
    			AvailabilityZone: pulumi.String(availabilityZone),
    			IsMulticast:      pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewClickhouseInstance(ctx, "cdwchInstancePrepaid", &tencentcloud.ClickhouseInstanceArgs{
    			Zone:           pulumi.String(availabilityZone),
    			HaFlag:         pulumi.Bool(true),
    			VpcId:          vpc.VpcId,
    			SubnetId:       subnet.SubnetId,
    			ProductVersion: pulumi.String("21.8.12.29"),
    			DataSpec: &tencentcloud.ClickhouseInstanceDataSpecArgs{
    				SpecName: pulumi.String(dataSpecName4c16m),
    				Count:    pulumi.Float64(2),
    				DiskSize: pulumi.Float64(300),
    			},
    			CommonSpec: &tencentcloud.ClickhouseInstanceCommonSpecArgs{
    				SpecName: pulumi.String(commonSpecName4c16m),
    				Count:    pulumi.Float64(3),
    				DiskSize: pulumi.Float64(300),
    			},
    			ChargeType:   pulumi.String("PREPAID"),
    			RenewFlag:    pulumi.Float64(1),
    			TimeSpan:     pulumi.Float64(1),
    			InstanceName: pulumi.String("tf-test-clickhouse-prepaid"),
    		})
    		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 config = new Config();
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-6";
        var spec = Tencentcloud.GetClickhouseSpec.Invoke(new()
        {
            Zone = availabilityZone,
            PayMode = "POSTPAID_BY_HOUR",
            IsElastic = false,
        });
    
        var dataSpec = .Where(i => i["cpu"] == 4 && i["mem"] == 16).Select(i => 
        {
            return i;
        }).ToList();
    
        var dataSpecName4c16m = dataSpec[0].Name;
    
        var commonSpec = .Where(i => i["cpu"] == 4 && i["mem"] == 16).Select(i => 
        {
            return i;
        }).ToList();
    
        var commonSpecName4c16m = commonSpec[0].Name;
    
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            VpcId = vpc.VpcId,
            CidrBlock = "10.0.0.0/16",
            AvailabilityZone = availabilityZone,
            IsMulticast = false,
        });
    
        var cdwchInstancePrepaid = new Tencentcloud.ClickhouseInstance("cdwchInstancePrepaid", new()
        {
            Zone = availabilityZone,
            HaFlag = true,
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            ProductVersion = "21.8.12.29",
            DataSpec = new Tencentcloud.Inputs.ClickhouseInstanceDataSpecArgs
            {
                SpecName = dataSpecName4c16m,
                Count = 2,
                DiskSize = 300,
            },
            CommonSpec = new Tencentcloud.Inputs.ClickhouseInstanceCommonSpecArgs
            {
                SpecName = commonSpecName4c16m,
                Count = 3,
                DiskSize = 300,
            },
            ChargeType = "PREPAID",
            RenewFlag = 1,
            TimeSpan = 1,
            InstanceName = "tf-test-clickhouse-prepaid",
        });
    
    });
    
    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.GetClickhouseSpecArgs;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Subnet;
    import com.pulumi.tencentcloud.SubnetArgs;
    import com.pulumi.tencentcloud.ClickhouseInstance;
    import com.pulumi.tencentcloud.ClickhouseInstanceArgs;
    import com.pulumi.tencentcloud.inputs.ClickhouseInstanceDataSpecArgs;
    import com.pulumi.tencentcloud.inputs.ClickhouseInstanceCommonSpecArgs;
    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 config = ctx.config();
            final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-6");
            final var spec = TencentcloudFunctions.getClickhouseSpec(GetClickhouseSpecArgs.builder()
                .zone(availabilityZone)
                .payMode("POSTPAID_BY_HOUR")
                .isElastic(false)
                .build());
    
            final var dataSpec = "TODO: ForExpression";
    
            final var dataSpecName4c16m = dataSpec[0].name();
    
            final var commonSpec = "TODO: ForExpression";
    
            final var commonSpecName4c16m = commonSpec[0].name();
    
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .vpcId(vpc.vpcId())
                .cidrBlock("10.0.0.0/16")
                .availabilityZone(availabilityZone)
                .isMulticast(false)
                .build());
    
            var cdwchInstancePrepaid = new ClickhouseInstance("cdwchInstancePrepaid", ClickhouseInstanceArgs.builder()
                .zone(availabilityZone)
                .haFlag(true)
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .productVersion("21.8.12.29")
                .dataSpec(ClickhouseInstanceDataSpecArgs.builder()
                    .specName(dataSpecName4c16m)
                    .count(2)
                    .diskSize(300)
                    .build())
                .commonSpec(ClickhouseInstanceCommonSpecArgs.builder()
                    .specName(commonSpecName4c16m)
                    .count(3)
                    .diskSize(300)
                    .build())
                .chargeType("PREPAID")
                .renewFlag(1)
                .timeSpan(1)
                .instanceName("tf-test-clickhouse-prepaid")
                .build());
    
        }
    }
    
    Coming soon!
    

    Create ClickhouseInstance Resource

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

    Constructor syntax

    new ClickhouseInstance(name: string, args: ClickhouseInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def ClickhouseInstance(resource_name: str,
                           args: ClickhouseInstanceArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClickhouseInstance(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           instance_name: Optional[str] = None,
                           zone: Optional[str] = None,
                           vpc_id: Optional[str] = None,
                           subnet_id: Optional[str] = None,
                           charge_type: Optional[str] = None,
                           data_spec: Optional[ClickhouseInstanceDataSpecArgs] = None,
                           ha_flag: Optional[bool] = None,
                           product_version: Optional[str] = None,
                           cos_bucket_name: Optional[str] = None,
                           mount_disk_type: Optional[float] = None,
                           ha_zk: Optional[bool] = None,
                           renew_flag: Optional[float] = None,
                           secondary_zone_infos: Optional[Sequence[ClickhouseInstanceSecondaryZoneInfoArgs]] = None,
                           common_spec: Optional[ClickhouseInstanceCommonSpecArgs] = None,
                           tags: Optional[Mapping[str, str]] = None,
                           time_span: Optional[float] = None,
                           cls_log_set_id: Optional[str] = None,
                           clickhouse_instance_id: Optional[str] = None)
    func NewClickhouseInstance(ctx *Context, name string, args ClickhouseInstanceArgs, opts ...ResourceOption) (*ClickhouseInstance, error)
    public ClickhouseInstance(string name, ClickhouseInstanceArgs args, CustomResourceOptions? opts = null)
    public ClickhouseInstance(String name, ClickhouseInstanceArgs args)
    public ClickhouseInstance(String name, ClickhouseInstanceArgs args, CustomResourceOptions options)
    
    type: tencentcloud:ClickhouseInstance
    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 ClickhouseInstanceArgs
    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 ClickhouseInstanceArgs
    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 ClickhouseInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClickhouseInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClickhouseInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ChargeType string
    Billing type: PREPAID prepaid, POSTPAID_BY_HOUR postpaid.
    DataSpec ClickhouseInstanceDataSpec
    Data spec.
    HaFlag bool
    Whether it is highly available.
    InstanceName string
    Instance name.
    ProductVersion string
    Product version.
    SubnetId string
    Subnet.
    VpcId string
    Private network.
    Zone string
    Availability zone.
    ClickhouseInstanceId string
    ID of the resource.
    ClsLogSetId string
    CLS log set id.
    CommonSpec ClickhouseInstanceCommonSpec
    ZK node.
    CosBucketName string
    COS bucket name.
    HaZk bool
    Whether ZK is highly available.
    MountDiskType double
    Whether it is mounted on a bare disk.
    RenewFlag double
    PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
    SecondaryZoneInfos List<ClickhouseInstanceSecondaryZoneInfo>
    Secondary zone info.
    Tags Dictionary<string, string>
    Tag description list.
    TimeSpan double
    Prepaid needs to be delivered, billing time length, how many months.
    ChargeType string
    Billing type: PREPAID prepaid, POSTPAID_BY_HOUR postpaid.
    DataSpec ClickhouseInstanceDataSpecArgs
    Data spec.
    HaFlag bool
    Whether it is highly available.
    InstanceName string
    Instance name.
    ProductVersion string
    Product version.
    SubnetId string
    Subnet.
    VpcId string
    Private network.
    Zone string
    Availability zone.
    ClickhouseInstanceId string
    ID of the resource.
    ClsLogSetId string
    CLS log set id.
    CommonSpec ClickhouseInstanceCommonSpecArgs
    ZK node.
    CosBucketName string
    COS bucket name.
    HaZk bool
    Whether ZK is highly available.
    MountDiskType float64
    Whether it is mounted on a bare disk.
    RenewFlag float64
    PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
    SecondaryZoneInfos []ClickhouseInstanceSecondaryZoneInfoArgs
    Secondary zone info.
    Tags map[string]string
    Tag description list.
    TimeSpan float64
    Prepaid needs to be delivered, billing time length, how many months.
    chargeType String
    Billing type: PREPAID prepaid, POSTPAID_BY_HOUR postpaid.
    dataSpec ClickhouseInstanceDataSpec
    Data spec.
    haFlag Boolean
    Whether it is highly available.
    instanceName String
    Instance name.
    productVersion String
    Product version.
    subnetId String
    Subnet.
    vpcId String
    Private network.
    zone String
    Availability zone.
    clickhouseInstanceId String
    ID of the resource.
    clsLogSetId String
    CLS log set id.
    commonSpec ClickhouseInstanceCommonSpec
    ZK node.
    cosBucketName String
    COS bucket name.
    haZk Boolean
    Whether ZK is highly available.
    mountDiskType Double
    Whether it is mounted on a bare disk.
    renewFlag Double
    PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
    secondaryZoneInfos List<ClickhouseInstanceSecondaryZoneInfo>
    Secondary zone info.
    tags Map<String,String>
    Tag description list.
    timeSpan Double
    Prepaid needs to be delivered, billing time length, how many months.
    chargeType string
    Billing type: PREPAID prepaid, POSTPAID_BY_HOUR postpaid.
    dataSpec ClickhouseInstanceDataSpec
    Data spec.
    haFlag boolean
    Whether it is highly available.
    instanceName string
    Instance name.
    productVersion string
    Product version.
    subnetId string
    Subnet.
    vpcId string
    Private network.
    zone string
    Availability zone.
    clickhouseInstanceId string
    ID of the resource.
    clsLogSetId string
    CLS log set id.
    commonSpec ClickhouseInstanceCommonSpec
    ZK node.
    cosBucketName string
    COS bucket name.
    haZk boolean
    Whether ZK is highly available.
    mountDiskType number
    Whether it is mounted on a bare disk.
    renewFlag number
    PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
    secondaryZoneInfos ClickhouseInstanceSecondaryZoneInfo[]
    Secondary zone info.
    tags {[key: string]: string}
    Tag description list.
    timeSpan number
    Prepaid needs to be delivered, billing time length, how many months.
    charge_type str
    Billing type: PREPAID prepaid, POSTPAID_BY_HOUR postpaid.
    data_spec ClickhouseInstanceDataSpecArgs
    Data spec.
    ha_flag bool
    Whether it is highly available.
    instance_name str
    Instance name.
    product_version str
    Product version.
    subnet_id str
    Subnet.
    vpc_id str
    Private network.
    zone str
    Availability zone.
    clickhouse_instance_id str
    ID of the resource.
    cls_log_set_id str
    CLS log set id.
    common_spec ClickhouseInstanceCommonSpecArgs
    ZK node.
    cos_bucket_name str
    COS bucket name.
    ha_zk bool
    Whether ZK is highly available.
    mount_disk_type float
    Whether it is mounted on a bare disk.
    renew_flag float
    PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
    secondary_zone_infos Sequence[ClickhouseInstanceSecondaryZoneInfoArgs]
    Secondary zone info.
    tags Mapping[str, str]
    Tag description list.
    time_span float
    Prepaid needs to be delivered, billing time length, how many months.
    chargeType String
    Billing type: PREPAID prepaid, POSTPAID_BY_HOUR postpaid.
    dataSpec Property Map
    Data spec.
    haFlag Boolean
    Whether it is highly available.
    instanceName String
    Instance name.
    productVersion String
    Product version.
    subnetId String
    Subnet.
    vpcId String
    Private network.
    zone String
    Availability zone.
    clickhouseInstanceId String
    ID of the resource.
    clsLogSetId String
    CLS log set id.
    commonSpec Property Map
    ZK node.
    cosBucketName String
    COS bucket name.
    haZk Boolean
    Whether ZK is highly available.
    mountDiskType Number
    Whether it is mounted on a bare disk.
    renewFlag Number
    PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
    secondaryZoneInfos List<Property Map>
    Secondary zone info.
    tags Map<String>
    Tag description list.
    timeSpan Number
    Prepaid needs to be delivered, billing time length, how many months.

    Outputs

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

    ExpireTime string
    Expire time.
    Id string
    The provider-assigned unique ID for this managed resource.
    ExpireTime string
    Expire time.
    Id string
    The provider-assigned unique ID for this managed resource.
    expireTime String
    Expire time.
    id String
    The provider-assigned unique ID for this managed resource.
    expireTime string
    Expire time.
    id string
    The provider-assigned unique ID for this managed resource.
    expire_time str
    Expire time.
    id str
    The provider-assigned unique ID for this managed resource.
    expireTime String
    Expire time.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ClickhouseInstance Resource

    Get an existing ClickhouseInstance 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?: ClickhouseInstanceState, opts?: CustomResourceOptions): ClickhouseInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            charge_type: Optional[str] = None,
            clickhouse_instance_id: Optional[str] = None,
            cls_log_set_id: Optional[str] = None,
            common_spec: Optional[ClickhouseInstanceCommonSpecArgs] = None,
            cos_bucket_name: Optional[str] = None,
            data_spec: Optional[ClickhouseInstanceDataSpecArgs] = None,
            expire_time: Optional[str] = None,
            ha_flag: Optional[bool] = None,
            ha_zk: Optional[bool] = None,
            instance_name: Optional[str] = None,
            mount_disk_type: Optional[float] = None,
            product_version: Optional[str] = None,
            renew_flag: Optional[float] = None,
            secondary_zone_infos: Optional[Sequence[ClickhouseInstanceSecondaryZoneInfoArgs]] = None,
            subnet_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            time_span: Optional[float] = None,
            vpc_id: Optional[str] = None,
            zone: Optional[str] = None) -> ClickhouseInstance
    func GetClickhouseInstance(ctx *Context, name string, id IDInput, state *ClickhouseInstanceState, opts ...ResourceOption) (*ClickhouseInstance, error)
    public static ClickhouseInstance Get(string name, Input<string> id, ClickhouseInstanceState? state, CustomResourceOptions? opts = null)
    public static ClickhouseInstance get(String name, Output<String> id, ClickhouseInstanceState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ClickhouseInstance    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:
    ChargeType string
    Billing type: PREPAID prepaid, POSTPAID_BY_HOUR postpaid.
    ClickhouseInstanceId string
    ID of the resource.
    ClsLogSetId string
    CLS log set id.
    CommonSpec ClickhouseInstanceCommonSpec
    ZK node.
    CosBucketName string
    COS bucket name.
    DataSpec ClickhouseInstanceDataSpec
    Data spec.
    ExpireTime string
    Expire time.
    HaFlag bool
    Whether it is highly available.
    HaZk bool
    Whether ZK is highly available.
    InstanceName string
    Instance name.
    MountDiskType double
    Whether it is mounted on a bare disk.
    ProductVersion string
    Product version.
    RenewFlag double
    PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
    SecondaryZoneInfos List<ClickhouseInstanceSecondaryZoneInfo>
    Secondary zone info.
    SubnetId string
    Subnet.
    Tags Dictionary<string, string>
    Tag description list.
    TimeSpan double
    Prepaid needs to be delivered, billing time length, how many months.
    VpcId string
    Private network.
    Zone string
    Availability zone.
    ChargeType string
    Billing type: PREPAID prepaid, POSTPAID_BY_HOUR postpaid.
    ClickhouseInstanceId string
    ID of the resource.
    ClsLogSetId string
    CLS log set id.
    CommonSpec ClickhouseInstanceCommonSpecArgs
    ZK node.
    CosBucketName string
    COS bucket name.
    DataSpec ClickhouseInstanceDataSpecArgs
    Data spec.
    ExpireTime string
    Expire time.
    HaFlag bool
    Whether it is highly available.
    HaZk bool
    Whether ZK is highly available.
    InstanceName string
    Instance name.
    MountDiskType float64
    Whether it is mounted on a bare disk.
    ProductVersion string
    Product version.
    RenewFlag float64
    PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
    SecondaryZoneInfos []ClickhouseInstanceSecondaryZoneInfoArgs
    Secondary zone info.
    SubnetId string
    Subnet.
    Tags map[string]string
    Tag description list.
    TimeSpan float64
    Prepaid needs to be delivered, billing time length, how many months.
    VpcId string
    Private network.
    Zone string
    Availability zone.
    chargeType String
    Billing type: PREPAID prepaid, POSTPAID_BY_HOUR postpaid.
    clickhouseInstanceId String
    ID of the resource.
    clsLogSetId String
    CLS log set id.
    commonSpec ClickhouseInstanceCommonSpec
    ZK node.
    cosBucketName String
    COS bucket name.
    dataSpec ClickhouseInstanceDataSpec
    Data spec.
    expireTime String
    Expire time.
    haFlag Boolean
    Whether it is highly available.
    haZk Boolean
    Whether ZK is highly available.
    instanceName String
    Instance name.
    mountDiskType Double
    Whether it is mounted on a bare disk.
    productVersion String
    Product version.
    renewFlag Double
    PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
    secondaryZoneInfos List<ClickhouseInstanceSecondaryZoneInfo>
    Secondary zone info.
    subnetId String
    Subnet.
    tags Map<String,String>
    Tag description list.
    timeSpan Double
    Prepaid needs to be delivered, billing time length, how many months.
    vpcId String
    Private network.
    zone String
    Availability zone.
    chargeType string
    Billing type: PREPAID prepaid, POSTPAID_BY_HOUR postpaid.
    clickhouseInstanceId string
    ID of the resource.
    clsLogSetId string
    CLS log set id.
    commonSpec ClickhouseInstanceCommonSpec
    ZK node.
    cosBucketName string
    COS bucket name.
    dataSpec ClickhouseInstanceDataSpec
    Data spec.
    expireTime string
    Expire time.
    haFlag boolean
    Whether it is highly available.
    haZk boolean
    Whether ZK is highly available.
    instanceName string
    Instance name.
    mountDiskType number
    Whether it is mounted on a bare disk.
    productVersion string
    Product version.
    renewFlag number
    PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
    secondaryZoneInfos ClickhouseInstanceSecondaryZoneInfo[]
    Secondary zone info.
    subnetId string
    Subnet.
    tags {[key: string]: string}
    Tag description list.
    timeSpan number
    Prepaid needs to be delivered, billing time length, how many months.
    vpcId string
    Private network.
    zone string
    Availability zone.
    charge_type str
    Billing type: PREPAID prepaid, POSTPAID_BY_HOUR postpaid.
    clickhouse_instance_id str
    ID of the resource.
    cls_log_set_id str
    CLS log set id.
    common_spec ClickhouseInstanceCommonSpecArgs
    ZK node.
    cos_bucket_name str
    COS bucket name.
    data_spec ClickhouseInstanceDataSpecArgs
    Data spec.
    expire_time str
    Expire time.
    ha_flag bool
    Whether it is highly available.
    ha_zk bool
    Whether ZK is highly available.
    instance_name str
    Instance name.
    mount_disk_type float
    Whether it is mounted on a bare disk.
    product_version str
    Product version.
    renew_flag float
    PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
    secondary_zone_infos Sequence[ClickhouseInstanceSecondaryZoneInfoArgs]
    Secondary zone info.
    subnet_id str
    Subnet.
    tags Mapping[str, str]
    Tag description list.
    time_span float
    Prepaid needs to be delivered, billing time length, how many months.
    vpc_id str
    Private network.
    zone str
    Availability zone.
    chargeType String
    Billing type: PREPAID prepaid, POSTPAID_BY_HOUR postpaid.
    clickhouseInstanceId String
    ID of the resource.
    clsLogSetId String
    CLS log set id.
    commonSpec Property Map
    ZK node.
    cosBucketName String
    COS bucket name.
    dataSpec Property Map
    Data spec.
    expireTime String
    Expire time.
    haFlag Boolean
    Whether it is highly available.
    haZk Boolean
    Whether ZK is highly available.
    instanceName String
    Instance name.
    mountDiskType Number
    Whether it is mounted on a bare disk.
    productVersion String
    Product version.
    renewFlag Number
    PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
    secondaryZoneInfos List<Property Map>
    Secondary zone info.
    subnetId String
    Subnet.
    tags Map<String>
    Tag description list.
    timeSpan Number
    Prepaid needs to be delivered, billing time length, how many months.
    vpcId String
    Private network.
    zone String
    Availability zone.

    Supporting Types

    ClickhouseInstanceCommonSpec, ClickhouseInstanceCommonSpecArgs

    Count double
    Node count. NOTE: Only support value 3.
    DiskSize double
    Disk size.
    SpecName string
    Spec name.
    Count float64
    Node count. NOTE: Only support value 3.
    DiskSize float64
    Disk size.
    SpecName string
    Spec name.
    count Double
    Node count. NOTE: Only support value 3.
    diskSize Double
    Disk size.
    specName String
    Spec name.
    count number
    Node count. NOTE: Only support value 3.
    diskSize number
    Disk size.
    specName string
    Spec name.
    count float
    Node count. NOTE: Only support value 3.
    disk_size float
    Disk size.
    spec_name str
    Spec name.
    count Number
    Node count. NOTE: Only support value 3.
    diskSize Number
    Disk size.
    specName String
    Spec name.

    ClickhouseInstanceDataSpec, ClickhouseInstanceDataSpecArgs

    Count double
    Data spec count.
    DiskSize double
    Disk size.
    SpecName string
    Spec name.
    Count float64
    Data spec count.
    DiskSize float64
    Disk size.
    SpecName string
    Spec name.
    count Double
    Data spec count.
    diskSize Double
    Disk size.
    specName String
    Spec name.
    count number
    Data spec count.
    diskSize number
    Disk size.
    specName string
    Spec name.
    count float
    Data spec count.
    disk_size float
    Disk size.
    spec_name str
    Spec name.
    count Number
    Data spec count.
    diskSize Number
    Disk size.
    specName String
    Spec name.

    ClickhouseInstanceSecondaryZoneInfo, ClickhouseInstanceSecondaryZoneInfoArgs

    SecondarySubnet string
    Secondary subnet.
    SecondaryZone string
    Secondary zone.
    SecondarySubnet string
    Secondary subnet.
    SecondaryZone string
    Secondary zone.
    secondarySubnet String
    Secondary subnet.
    secondaryZone String
    Secondary zone.
    secondarySubnet string
    Secondary subnet.
    secondaryZone string
    Secondary zone.
    secondary_subnet str
    Secondary subnet.
    secondary_zone str
    Secondary zone.
    secondarySubnet String
    Secondary subnet.
    secondaryZone String
    Secondary zone.

    Import

    Clickhouse instance can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/clickhouseInstance:ClickhouseInstance foo cdwch-xxxxxx
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack