Cluster Args
data class ClusterArgs(val autoRenewPeriod: Output<Int>? = null, val computeResource: Output<String>? = null, val dbClusterCategory: Output<String>? = null, val dbClusterClass: Output<String>? = null, val dbClusterVersion: Output<String>? = null, val dbNodeClass: Output<String>? = null, val dbNodeCount: Output<Int>? = null, val dbNodeStorage: Output<Int>? = null, val description: Output<String>? = null, val diskPerformanceLevel: Output<String>? = null, val elasticIoResource: Output<Int>? = null, val elasticIoResourceSize: Output<String>? = null, val maintainTime: Output<String>? = null, val mode: Output<String>? = null, val modifyType: Output<String>? = null, val payType: Output<String>? = null, val paymentType: Output<String>? = null, val period: Output<Int>? = null, val renewalStatus: Output<String>? = null, val resourceGroupId: Output<String>? = null, val securityIps: Output<List<String>>? = null, val tags: Output<Map<String, Any>>? = null, val vpcId: Output<String>? = null, val vswitchId: Output<String>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<ClusterArgs>
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());
}
}
Content copied to clipboard
Import
ADB cluster can be imported using the id, e.g.
$ pulumi import alicloud:adb/cluster:Cluster example am-abc12345678
Content copied to clipboard
Constructors
Link copied to clipboard
fun ClusterArgs(autoRenewPeriod: Output<Int>? = null, computeResource: Output<String>? = null, dbClusterCategory: Output<String>? = null, dbClusterClass: Output<String>? = null, dbClusterVersion: Output<String>? = null, dbNodeClass: Output<String>? = null, dbNodeCount: Output<Int>? = null, dbNodeStorage: Output<Int>? = null, description: Output<String>? = null, diskPerformanceLevel: Output<String>? = null, elasticIoResource: Output<Int>? = null, elasticIoResourceSize: Output<String>? = null, maintainTime: Output<String>? = null, mode: Output<String>? = null, modifyType: Output<String>? = null, payType: Output<String>? = null, paymentType: Output<String>? = null, period: Output<Int>? = null, renewalStatus: Output<String>? = null, resourceGroupId: Output<String>? = null, securityIps: Output<List<String>>? = null, tags: Output<Map<String, Any>>? = null, vpcId: Output<String>? = null, vswitchId: Output<String>? = null, zoneId: Output<String>? = null)
Functions
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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).