Cluster

class Cluster : KotlinCustomResource

Provides a ADB cluster resource. An ADB cluster is an isolated database environment in the cloud. An ADB cluster can contain multiple user-created databases.

DEPRECATED: This resource has been deprecated from version 1.121.0. Please use new resource alicloud_adb_db_cluster. NOTE: Available in v1.71.0+.

Example Usage

Create a ADB MySQL cluster

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
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.adb.Cluster;
import com.pulumi.alicloud.adb.ClusterArgs;
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("adbClusterconfig");
final var creation = config.get("creation").orElse("ADB");
final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation(creation)
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("172.16.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vpcId(defaultNetwork.id())
.cidrBlock("172.16.0.0/24")
.zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.vswitchName(name)
.build());
var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
.dbClusterVersion("3.0")
.dbClusterCategory("Cluster")
.dbNodeClass("C8")
.dbNodeCount(2)
.dbNodeStorage(200)
.payType("PostPaid")
.description(name)
.vswitchId(defaultSwitch.id())
.build());
}
}

Import

ADB cluster can be imported using the id, e.g.

$ pulumi import alicloud:adb/cluster:Cluster example am-abc12345678

Properties

Link copied to clipboard
val autoRenewPeriod: Output<Int>

Auto-renewal period of an cluster, in the unit of the month. It is valid when pay_type is PrePaid. Valid value:1, 2, 3, 6, 12, 24, 36, Default to 1.

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

(Available in 1.93.0+) The connection string of the ADB cluster.

Link copied to clipboard

Cluster category. Value options: Basic, Cluster.

Link copied to clipboard
val dbClusterClass: Output<String>?
Link copied to clipboard
val dbClusterVersion: Output<String>?

Cluster version. Value options: 3.0, Default to 3.0.

Link copied to clipboard
val dbNodeClass: Output<String>

The db_node_class of cluster node.

Link copied to clipboard
val dbNodeCount: Output<Int>

The db_node_count of cluster node.

Link copied to clipboard
val dbNodeStorage: Output<Int>

The db_node_storage of cluster node.

Link copied to clipboard
val description: Output<String>

The description of cluster.

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

Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)

Link copied to clipboard
val mode: Output<String>
Link copied to clipboard
val modifyType: Output<String>?
Link copied to clipboard
val paymentType: Output<String>

The payment type of the resource. Valid values are PayAsYouGo and Subscription. Default to PayAsYouGo. Note: The payment_type supports updating from v1.166.0+.

Link copied to clipboard
val payType: Output<String>

Field pay_type has been deprecated. New field payment_type instead.

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

The duration that you will buy DB cluster (in month). It is valid when pay_type is PrePaid. Valid values: 1~9, 12, 24, 36. Default to 1.

Link copied to clipboard
val port: Output<String>

(Available in 1.196.0+) The connection port of the ADB cluster.

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

Valid values are AutoRenewal, Normal, NotRenewal, Default to NotRenewal.

Link copied to clipboard
val resourceGroupId: Output<String>
Link copied to clipboard
val securityIps: Output<List<String>>

List of IP addresses allowed to access all databases of an cluster. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is 1,32).

Link copied to clipboard
val status: Output<String>
Link copied to clipboard
val tags: Output<Map<String, Any>>?

A mapping of tags to assign to the resource.

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

The virtual switch ID to launch DB instances in one VPC.

Link copied to clipboard
val zoneId: Output<String>

The Zone to launch the DB cluster.