tencentcloud.ClickhouseInstance
Explore with Pulumi AI
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:
- Charge
Type string - Billing type:
PREPAID
prepaid,POSTPAID_BY_HOUR
postpaid. - Data
Spec ClickhouseInstance Data Spec - Data spec.
- Ha
Flag bool - Whether it is highly available.
- Instance
Name string - Instance name.
- Product
Version string - Product version.
- Subnet
Id string - Subnet.
- Vpc
Id string - Private network.
- Zone string
- Availability zone.
- Clickhouse
Instance stringId - ID of the resource.
- Cls
Log stringSet Id - CLS log set id.
- Common
Spec ClickhouseInstance Common Spec - ZK node.
- Cos
Bucket stringName - COS bucket name.
- Ha
Zk bool - Whether ZK is highly available.
- Mount
Disk doubleType - Whether it is mounted on a bare disk.
- Renew
Flag double - PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
- Secondary
Zone List<ClickhouseInfos Instance Secondary Zone Info> - Secondary zone info.
- Dictionary<string, string>
- Tag description list.
- Time
Span double - Prepaid needs to be delivered, billing time length, how many months.
- Charge
Type string - Billing type:
PREPAID
prepaid,POSTPAID_BY_HOUR
postpaid. - Data
Spec ClickhouseInstance Data Spec Args - Data spec.
- Ha
Flag bool - Whether it is highly available.
- Instance
Name string - Instance name.
- Product
Version string - Product version.
- Subnet
Id string - Subnet.
- Vpc
Id string - Private network.
- Zone string
- Availability zone.
- Clickhouse
Instance stringId - ID of the resource.
- Cls
Log stringSet Id - CLS log set id.
- Common
Spec ClickhouseInstance Common Spec Args - ZK node.
- Cos
Bucket stringName - COS bucket name.
- Ha
Zk bool - Whether ZK is highly available.
- Mount
Disk float64Type - Whether it is mounted on a bare disk.
- Renew
Flag float64 - PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
- Secondary
Zone []ClickhouseInfos Instance Secondary Zone Info Args - Secondary zone info.
- map[string]string
- Tag description list.
- Time
Span float64 - Prepaid needs to be delivered, billing time length, how many months.
- charge
Type String - Billing type:
PREPAID
prepaid,POSTPAID_BY_HOUR
postpaid. - data
Spec ClickhouseInstance Data Spec - Data spec.
- ha
Flag Boolean - Whether it is highly available.
- instance
Name String - Instance name.
- product
Version String - Product version.
- subnet
Id String - Subnet.
- vpc
Id String - Private network.
- zone String
- Availability zone.
- clickhouse
Instance StringId - ID of the resource.
- cls
Log StringSet Id - CLS log set id.
- common
Spec ClickhouseInstance Common Spec - ZK node.
- cos
Bucket StringName - COS bucket name.
- ha
Zk Boolean - Whether ZK is highly available.
- mount
Disk DoubleType - Whether it is mounted on a bare disk.
- renew
Flag Double - PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
- secondary
Zone List<ClickhouseInfos Instance Secondary Zone Info> - Secondary zone info.
- Map<String,String>
- Tag description list.
- time
Span Double - Prepaid needs to be delivered, billing time length, how many months.
- charge
Type string - Billing type:
PREPAID
prepaid,POSTPAID_BY_HOUR
postpaid. - data
Spec ClickhouseInstance Data Spec - Data spec.
- ha
Flag boolean - Whether it is highly available.
- instance
Name string - Instance name.
- product
Version string - Product version.
- subnet
Id string - Subnet.
- vpc
Id string - Private network.
- zone string
- Availability zone.
- clickhouse
Instance stringId - ID of the resource.
- cls
Log stringSet Id - CLS log set id.
- common
Spec ClickhouseInstance Common Spec - ZK node.
- cos
Bucket stringName - COS bucket name.
- ha
Zk boolean - Whether ZK is highly available.
- mount
Disk numberType - Whether it is mounted on a bare disk.
- renew
Flag number - PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
- secondary
Zone ClickhouseInfos Instance Secondary Zone Info[] - Secondary zone info.
- {[key: string]: string}
- Tag description list.
- time
Span 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 ClickhouseInstance Data Spec Args - 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_ strid - ID of the resource.
- cls_
log_ strset_ id - CLS log set id.
- common_
spec ClickhouseInstance Common Spec Args - ZK node.
- cos_
bucket_ strname - COS bucket name.
- ha_
zk bool - Whether ZK is highly available.
- mount_
disk_ floattype - 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_ Sequence[Clickhouseinfos Instance Secondary Zone Info Args] - Secondary zone info.
- Mapping[str, str]
- Tag description list.
- time_
span float - Prepaid needs to be delivered, billing time length, how many months.
- charge
Type String - Billing type:
PREPAID
prepaid,POSTPAID_BY_HOUR
postpaid. - data
Spec Property Map - Data spec.
- ha
Flag Boolean - Whether it is highly available.
- instance
Name String - Instance name.
- product
Version String - Product version.
- subnet
Id String - Subnet.
- vpc
Id String - Private network.
- zone String
- Availability zone.
- clickhouse
Instance StringId - ID of the resource.
- cls
Log StringSet Id - CLS log set id.
- common
Spec Property Map - ZK node.
- cos
Bucket StringName - COS bucket name.
- ha
Zk Boolean - Whether ZK is highly available.
- mount
Disk NumberType - Whether it is mounted on a bare disk.
- renew
Flag Number - PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
- secondary
Zone List<Property Map>Infos - Secondary zone info.
- Map<String>
- Tag description list.
- time
Span 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:
- Expire
Time string - Expire time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Expire
Time string - Expire time.
- Id string
- The provider-assigned unique ID for this managed resource.
- expire
Time String - Expire time.
- id String
- The provider-assigned unique ID for this managed resource.
- expire
Time 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.
- expire
Time 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.
- Charge
Type string - Billing type:
PREPAID
prepaid,POSTPAID_BY_HOUR
postpaid. - Clickhouse
Instance stringId - ID of the resource.
- Cls
Log stringSet Id - CLS log set id.
- Common
Spec ClickhouseInstance Common Spec - ZK node.
- Cos
Bucket stringName - COS bucket name.
- Data
Spec ClickhouseInstance Data Spec - Data spec.
- Expire
Time string - Expire time.
- Ha
Flag bool - Whether it is highly available.
- Ha
Zk bool - Whether ZK is highly available.
- Instance
Name string - Instance name.
- Mount
Disk doubleType - Whether it is mounted on a bare disk.
- Product
Version string - Product version.
- Renew
Flag double - PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
- Secondary
Zone List<ClickhouseInfos Instance Secondary Zone Info> - Secondary zone info.
- Subnet
Id string - Subnet.
- Dictionary<string, string>
- Tag description list.
- Time
Span double - Prepaid needs to be delivered, billing time length, how many months.
- Vpc
Id string - Private network.
- Zone string
- Availability zone.
- Charge
Type string - Billing type:
PREPAID
prepaid,POSTPAID_BY_HOUR
postpaid. - Clickhouse
Instance stringId - ID of the resource.
- Cls
Log stringSet Id - CLS log set id.
- Common
Spec ClickhouseInstance Common Spec Args - ZK node.
- Cos
Bucket stringName - COS bucket name.
- Data
Spec ClickhouseInstance Data Spec Args - Data spec.
- Expire
Time string - Expire time.
- Ha
Flag bool - Whether it is highly available.
- Ha
Zk bool - Whether ZK is highly available.
- Instance
Name string - Instance name.
- Mount
Disk float64Type - Whether it is mounted on a bare disk.
- Product
Version string - Product version.
- Renew
Flag float64 - PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
- Secondary
Zone []ClickhouseInfos Instance Secondary Zone Info Args - Secondary zone info.
- Subnet
Id string - Subnet.
- map[string]string
- Tag description list.
- Time
Span float64 - Prepaid needs to be delivered, billing time length, how many months.
- Vpc
Id string - Private network.
- Zone string
- Availability zone.
- charge
Type String - Billing type:
PREPAID
prepaid,POSTPAID_BY_HOUR
postpaid. - clickhouse
Instance StringId - ID of the resource.
- cls
Log StringSet Id - CLS log set id.
- common
Spec ClickhouseInstance Common Spec - ZK node.
- cos
Bucket StringName - COS bucket name.
- data
Spec ClickhouseInstance Data Spec - Data spec.
- expire
Time String - Expire time.
- ha
Flag Boolean - Whether it is highly available.
- ha
Zk Boolean - Whether ZK is highly available.
- instance
Name String - Instance name.
- mount
Disk DoubleType - Whether it is mounted on a bare disk.
- product
Version String - Product version.
- renew
Flag Double - PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
- secondary
Zone List<ClickhouseInfos Instance Secondary Zone Info> - Secondary zone info.
- subnet
Id String - Subnet.
- Map<String,String>
- Tag description list.
- time
Span Double - Prepaid needs to be delivered, billing time length, how many months.
- vpc
Id String - Private network.
- zone String
- Availability zone.
- charge
Type string - Billing type:
PREPAID
prepaid,POSTPAID_BY_HOUR
postpaid. - clickhouse
Instance stringId - ID of the resource.
- cls
Log stringSet Id - CLS log set id.
- common
Spec ClickhouseInstance Common Spec - ZK node.
- cos
Bucket stringName - COS bucket name.
- data
Spec ClickhouseInstance Data Spec - Data spec.
- expire
Time string - Expire time.
- ha
Flag boolean - Whether it is highly available.
- ha
Zk boolean - Whether ZK is highly available.
- instance
Name string - Instance name.
- mount
Disk numberType - Whether it is mounted on a bare disk.
- product
Version string - Product version.
- renew
Flag number - PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
- secondary
Zone ClickhouseInfos Instance Secondary Zone Info[] - Secondary zone info.
- subnet
Id string - Subnet.
- {[key: string]: string}
- Tag description list.
- time
Span number - Prepaid needs to be delivered, billing time length, how many months.
- vpc
Id string - Private network.
- zone string
- Availability zone.
- charge_
type str - Billing type:
PREPAID
prepaid,POSTPAID_BY_HOUR
postpaid. - clickhouse_
instance_ strid - ID of the resource.
- cls_
log_ strset_ id - CLS log set id.
- common_
spec ClickhouseInstance Common Spec Args - ZK node.
- cos_
bucket_ strname - COS bucket name.
- data_
spec ClickhouseInstance Data Spec Args - 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_ floattype - 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_ Sequence[Clickhouseinfos Instance Secondary Zone Info Args] - Secondary zone info.
- subnet_
id str - Subnet.
- 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.
- charge
Type String - Billing type:
PREPAID
prepaid,POSTPAID_BY_HOUR
postpaid. - clickhouse
Instance StringId - ID of the resource.
- cls
Log StringSet Id - CLS log set id.
- common
Spec Property Map - ZK node.
- cos
Bucket StringName - COS bucket name.
- data
Spec Property Map - Data spec.
- expire
Time String - Expire time.
- ha
Flag Boolean - Whether it is highly available.
- ha
Zk Boolean - Whether ZK is highly available.
- instance
Name String - Instance name.
- mount
Disk NumberType - Whether it is mounted on a bare disk.
- product
Version String - Product version.
- renew
Flag Number - PREPAID needs to be passed. Whether to renew automatically. 1 means auto renewal is enabled.
- secondary
Zone List<Property Map>Infos - Secondary zone info.
- subnet
Id String - Subnet.
- Map<String>
- Tag description list.
- time
Span Number - Prepaid needs to be delivered, billing time length, how many months.
- vpc
Id String - Private network.
- zone String
- Availability zone.
Supporting Types
ClickhouseInstanceCommonSpec, ClickhouseInstanceCommonSpecArgs
ClickhouseInstanceDataSpec, ClickhouseInstanceDataSpecArgs
ClickhouseInstanceSecondaryZoneInfo, ClickhouseInstanceSecondaryZoneInfoArgs
- Secondary
Subnet string - Secondary subnet.
- Secondary
Zone string - Secondary zone.
- Secondary
Subnet string - Secondary subnet.
- Secondary
Zone string - Secondary zone.
- secondary
Subnet String - Secondary subnet.
- secondary
Zone String - Secondary zone.
- secondary
Subnet string - Secondary subnet.
- secondary
Zone string - Secondary zone.
- secondary_
subnet str - Secondary subnet.
- secondary_
zone str - Secondary zone.
- secondary
Subnet String - Secondary subnet.
- secondary
Zone 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.