ClusterArgs

data class ClusterArgs(val clusterName: Output<String>? = null, val clusterType: Output<Int>? = null, val logicalRegionId: Output<String>? = null, val networkMode: Output<Int>? = null, val vpcId: Output<String>? = null) : ConvertibleToJava<ClusterArgs>

Provides an EDAS cluster resource, see What is EDAS Cluster.

NOTE: Available since v1.82.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.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetRegionsArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.edas.Cluster;
import com.pulumi.alicloud.edas.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("tf-example");
final var defaultRegions = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
.current(true)
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.4.0.0/16")
.build());
var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
.clusterName(name)
.clusterType("2")
.networkMode("2")
.logicalRegionId(defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id()))
.vpcId(defaultNetwork.id())
.build());
}
}

Import

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

$ pulumi import alicloud:edas/cluster:Cluster cluster cluster_id

Constructors

Link copied to clipboard
fun ClusterArgs(clusterName: Output<String>? = null, clusterType: Output<Int>? = null, logicalRegionId: Output<String>? = null, networkMode: Output<Int>? = null, vpcId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ClusterArgs

Properties

Link copied to clipboard
val clusterName: Output<String>? = null

The name of the cluster that you want to create.

Link copied to clipboard
val clusterType: Output<Int>? = null

The type of the cluster that you want to create. Valid values only: 2: ECS cluster.

Link copied to clipboard
val logicalRegionId: Output<String>? = null

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

Link copied to clipboard
val networkMode: Output<Int>? = null

The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.

Link copied to clipboard
val vpcId: Output<String>? = null

The ID of the Virtual Private Cloud (VPC) for the cluster.