DbCluster

class DbCluster : KotlinCustomResource

Provides a Click House DBCluster resource. For information about Click House DBCluster and how to use it, see What is DBCluster.

NOTE: Available since v1.134.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.clickhouse.ClickhouseFunctions;
import com.pulumi.alicloud.clickhouse.inputs.GetRegionsArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.clickhouse.DbCluster;
import com.pulumi.alicloud.clickhouse.DbClusterArgs;
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 name = config.get("name").orElse("tf-example");
final var defaultRegions = ClickhouseFunctions.getRegions(GetRegionsArgs.builder()
.current(true)
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.4.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("10.4.0.0/24")
.vpcId(defaultNetwork.id())
.zoneId(defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].zoneIds()[0].zoneId()))
.build());
var defaultDbCluster = new DbCluster("defaultDbCluster", DbClusterArgs.builder()
.dbClusterVersion("22.8.5.29")
.category("Basic")
.dbClusterClass("S8")
.dbClusterNetworkType("vpc")
.dbNodeGroupCount("1")
.paymentType("PayAsYouGo")
.dbNodeStorage("500")
.storageType("cloud_essd")
.vswitchId(defaultSwitch.id())
.vpcId(defaultNetwork.id())
.build());
}
}

Import

Click House DBCluster can be imported using the id, e.g.

$ pulumi import alicloud:clickhouse/dbCluster:DbCluster example <id>

Properties

Link copied to clipboard
val category: Output<String>

The Category of DBCluster. Valid values: Basic,HighAvailability.

Link copied to clipboard

(Available since v1.196.0) - The connection string of the cluster.

Link copied to clipboard

The db cluster access white list. See db_cluster_access_white_list below.

Link copied to clipboard
val dbClusterClass: Output<String>

The DBCluster class. According to the category, db_cluster_class has two value ranges:

Link copied to clipboard

The DBCluster description.

Link copied to clipboard

The DBCluster network type. Valid values: vpc.

Link copied to clipboard

The DBCluster version. Valid values: 20.3.10.75, 20.8.7.15, 21.8.10.19, 22.8.5.29. NOTE: 19.15.2.2 is no longer supported. From version 1.191.0, db_cluster_version can be set to 22.8.5.29.

Link copied to clipboard
val dbNodeGroupCount: Output<Int>

The db node group count. The number should between 1 and 48.

Link copied to clipboard
val dbNodeStorage: Output<String>

The db node storage.

Link copied to clipboard
val encryptionKey: Output<String>?

Key management service KMS key ID.

Link copied to clipboard
val encryptionType: Output<String>?

Currently only supports ECS disk encryption, with a value of CloudDisk, not encrypted when empty.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val maintainTime: Output<String>

The maintenance window of DBCluster. Valid format: hh:mmZ-hh:mm Z.

Link copied to clipboard
val paymentType: Output<String>

The payment type of the resource. Valid values: PayAsYouGo,Subscription.

Link copied to clipboard
val period: Output<String>?

Pre-paid cluster of the pay-as-you-go cycle. Valid values: Month, Year.

Link copied to clipboard
val port: Output<String>

(Available since v1.196.0) The connection port of the cluster.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: Output<String>

The status of the resource. Valid values: Running,Creating,Deleting,Restarting,Preparing.

Link copied to clipboard
val storageType: Output<String>

Storage type of DBCluster. Valid values: cloud_essd, cloud_efficiency, cloud_essd_pl2, cloud_essd_pl3.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val usedTime: Output<String>?

The used time of DBCluster.

Link copied to clipboard
val vpcId: Output<String>

The id of the VPC.

Link copied to clipboard
val vswitchId: Output<String>?

The vswitch id of DBCluster.

Link copied to clipboard
val zoneId: Output<String>

The zone ID of the instance.