Cluster

class Cluster : KotlinCustomResource

Example Usage

Redis Cluster Ha

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.networkconnectivity.ServiceConnectionPolicy;
import com.pulumi.gcp.networkconnectivity.ServiceConnectionPolicyArgs;
import com.pulumi.gcp.networkconnectivity.inputs.ServiceConnectionPolicyPscConfigArgs;
import com.pulumi.gcp.redis.Cluster;
import com.pulumi.gcp.redis.ClusterArgs;
import com.pulumi.gcp.redis.inputs.ClusterPscConfigArgs;
import com.pulumi.resources.CustomResourceOptions;
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) {
var producerNet = new Network("producerNet", NetworkArgs.builder()
.autoCreateSubnetworks(false)
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var producerSubnet = new Subnetwork("producerSubnet", SubnetworkArgs.builder()
.ipCidrRange("10.0.0.248/29")
.region("us-central1")
.network(producerNet.id())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var default_ = new ServiceConnectionPolicy("default", ServiceConnectionPolicyArgs.builder()
.location("us-central1")
.serviceClass("gcp-memorystore-redis")
.description("my basic service connection policy")
.network(producerNet.id())
.pscConfig(ServiceConnectionPolicyPscConfigArgs.builder()
.subnetworks(producerSubnet.id())
.build())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var cluster_ha = new Cluster("cluster-ha", ClusterArgs.builder()
.shardCount(3)
.pscConfigs(ClusterPscConfigArgs.builder()
.network(producerNet.id())
.build())
.region("us-central1")
.replicaCount(1)
.transitEncryptionMode("TRANSIT_ENCRYPTION_MODE_DISABLED")
.authorizationMode("AUTH_MODE_DISABLED")
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.dependsOn(default_)
.build());
}
}

Import

Cluster can be imported using any of these accepted formats

$ pulumi import gcp:redis/cluster:Cluster default projects/{{project}}/locations/{{region}}/clusters/{{name}}
$ pulumi import gcp:redis/cluster:Cluster default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:redis/cluster:Cluster default {{region}}/{{name}}
$ pulumi import gcp:redis/cluster:Cluster default {{name}}

Properties

Link copied to clipboard

Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster. Default value is AUTH_MODE_DISABLED. Possible values are: AUTH_MODE_UNSPECIFIED, AUTH_MODE_IAM_AUTH, AUTH_MODE_DISABLED.

Link copied to clipboard
val createTime: Output<String>

The timestamp associated with the cluster creation request. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Link copied to clipboard

Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one endpoint is supported. Structure is documented below.

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

Unique name of the resource in this scope including project and location using the form: projects/{projectId}/locations/{locationId}/clusters/{clusterId}

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard

Required. Each PscConfig configures the consumer network where two network addresses will be designated to the cluster for client access. Currently, only one PscConfig is supported. Structure is documented below.

Link copied to clipboard

Output only. PSC connections for discovery of the cluster topology and accessing the cluster. Structure is documented below.

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

The name of the region of the Redis cluster.

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

Optional. The number of replica nodes per shard.

Link copied to clipboard
val shardCount: Output<Int>

Required. Number of shards for the Redis cluster.

Link copied to clipboard
val sizeGb: Output<Int>

Output only. Redis memory size in GB for the entire cluster.

Link copied to clipboard
val state: Output<String>

The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED

Link copied to clipboard

Output only. Additional information about the current state of the cluster. Structure is documented below.

Link copied to clipboard

Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster. Default value is TRANSIT_ENCRYPTION_MODE_DISABLED. Possible values are: TRANSIT_ENCRYPTION_MODE_UNSPECIFIED, TRANSIT_ENCRYPTION_MODE_DISABLED, TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION.

Link copied to clipboard
val uid: Output<String>

System assigned, unique identifier for the cluster.

Link copied to clipboard
val urn: Output<String>