import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A Google Cloud Redis Cluster instance. * * To get more information about Cluster, see: * * * [API documentation](https://cloud.google.com/memorystore/docs/cluster/reference/rest/v1/projects.locations.clusters) * * How-to Guides * * [Official Documentation](https://cloud.google.com/memorystore/docs/cluster/) * * > **Note:** For [Multiple VPC Networking](https://cloud.google.com/memorystore/docs/cluster/about-multiple-vpc-networking) if you want to use * [User-registered PSC Connections](https://cloud.google.com/memorystore/docs/cluster/about-multiple-vpc-networking#psc_connection_types), * then please use `gcp.redis.ClusterUserCreatedConnections` resource. * * For [Cross Region Replication](https://cloud.google.com/memorystore/docs/cluster/about-cross-region-replication), please follow the instructions below for performing certain update and failover (switchover and detach) operations * * **Cross Region Replication** * * **Settings updated on primary and propagated to secondaries** * * The settings listed [here](https://cloud.google.com/memorystore/docs/cluster/about-cross-region-replication#set_on_primary) * are only allowed to be updated on the primary cluster and the changes are automatically propagated to the secondary clusters. * To keep the Terraform configuration and state in sync for such settings, please follow the below steps to update them: * 1. Update the setting on the primary cluster: * * Update the setting to its new desired value in the Terraform configuration file. * * Execute `pulumi up` to apply the change and wait for it to complete. * 2. Detect configuration drift on the secondary cluster(s): * * Execute `pulumi preview`. This should reveal a diff for the modified setting. The proposed value in the pulumi preview should align with the updated value applied to the primary cluster in the preceding step. * 3. Reconcile secondary cluster(s) configuration: * * Manually edit the Terraform configuration file(s) for the secondary cluster(s) to update the setting with the latest value from the state. * * Execute `pulumi preview` once again. This should not generate any diff, confirming the configuration is in sync with the infrastructure. * * **Switchover** * * To perform a [switchover](https://cloud.google.com/memorystore/docs/cluster/working-with-cross-region-replication#perform_a_switchover), please follow the below steps: * 1. Ensure that the Terraform configuration file for the secondary cluster that needs to become the new primary has the `crossClusterReplicationConfig` field. If it is not present: * * Add the `crossClusterReplicationConfig` field to the configuration file to match the latest value in the state. * * Execute `pulumi preview`. This should not generate any diff, confirming the configuration is in sync with the infrastructure. * 2. Update the `crossClusterReplicationConfig` field of the secondary that needs to become the new primary: * * Change `cross_cluster_replication_config.cluster_role` from `SECONDARY` to `PRIMARY`. * * Remove `cross_cluster_replication_config.primary_cluster` field. * * Set `cross_cluster_replication_config.secondary_clusters` list with the new secondaries. The new secondaries are the current primary and other secondary clusters(if any). * * > You can refer to the current value of `cross_cluster_replication_config.membership` field to lookup the current primary and secondary clusters. * 3. Execute switchover: * * Execute`pulumi up` to apply the change and wait for it to complete. * 4. Fix any configuration drifts on the previous primary and other secondary clusters: * * Execute `pulumi preview`. If any diffs are reported for `crossClusterReplicationConfig` field: * * Manually update `crossClusterReplicationConfig` field in the configuration file(s) for those clusters with the latest value from the state. * * Execute `pulumi preview` once again. This should not generate any diff, confirming the configuration is in sync with the infrastructure. * * **Detach a secondary cluster** * * To [detach](https://cloud.google.com/memorystore/docs/cluster/working-with-cross-region-replication#detach_secondary_clusters_option_1) a secondary cluster, please follow the below steps: * 1. Ensure that the Terraform configuration file for the secondary cluster that needs to be detached has the `crossClusterReplicationConfig` field. If it is not present: * * Add the `crossClusterReplicationConfig` field to the configuration file to match the latest value in the state. * * Execute `pulumi preview`. This should not generate any diff, confirming the configuration is in sync with the infrastructure. * 2. Update the `crossClusterReplicationConfig` field of the secondary that needs to be detached: * * Change `cross_cluster_replication_config.cluster_role` from `SECONDARY` to `NONE`. * * Remove `cross_cluster_replication_config.primary_cluster`. * 3. Execute detach: * * Execute`pulumi up` to apply the change and wait for it to complete. * 4. Fix any configuration drifts on the primary cluster: * * Execute `pulumi preview`. If any diff is reported for `crossClusterReplicationConfig` field: * * Manually update `crossClusterReplicationConfig` field in the configuration file with the latest value from the state. * * Execute `pulumi preview` once again. This should not generate any diff, confirming the configuration is in sync with the infrastructure. * * **Detach secondary cluster(s) via primary cluster** * * To [detach](https://cloud.google.com/memorystore/docs/cluster/working-with-cross-region-replication#detach_secondary_clusters_option_2) secondary clusters via primary, please follow the below steps: * 1. Ensure that the Terraform configuration file for the primary cluster from which the secondary(ies) has(ve) to be detached has the `crossClusterReplicationConfig` field. If it is not present: * * Add the `crossClusterReplicationConfig` field to the configuration file to match the latest value in the state. * * Execute `pulumi preview`. This should not generate any diff, confirming the configuration is in sync with the infrastructure. * 2. Update the `crossClusterReplicationConfig` field of the primary cluster: * * If you are detaching all secondaries from the primary: * * Change `cross_cluster_replication_config.cluster_role` from `PRIMARY` to `NONE`. * * Remove `cross_cluster_replication_config.secondary_clusters` list field. * * If you are detaching a subset of secondaries: * * Update `cross_cluster_replication_config.secondary_clusters` list field to remove the secondary clusters that need to be detached. * 3. Execute detach: * * Execute `pulumi up` to apply the change and wait for it to complete. * 4. Fix any configuration drifts on the secondary cluster(s) that was detached: * * Execute `pulumi preview`. If any diffs are reported for `crossClusterReplicationConfig` field: * * Manually update `crossClusterReplicationConfig` field in the configuration file(s) for those clusters with the latest value from the state. * * Execute `pulumi preview` once again. This should not generate any diff, confirming the configuration is in sync with the infrastructure. * * ## Example Usage * * ### Redis Cluster Ha With Labels * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const consumerNet = new gcp.compute.Network("consumer_net", { * name: "my-network", * autoCreateSubnetworks: false, * }); * const consumerSubnet = new gcp.compute.Subnetwork("consumer_subnet", { * name: "my-subnet", * ipCidrRange: "10.0.0.248/29", * region: "us-central1", * network: consumerNet.id, * }); * const _default = new gcp.networkconnectivity.ServiceConnectionPolicy("default", { * name: "my-policy", * location: "us-central1", * serviceClass: "gcp-memorystore-redis", * description: "my basic service connection policy", * network: consumerNet.id, * pscConfig: { * subnetworks: [consumerSubnet.id], * }, * }); * const cluster_ha_with_labels = new gcp.redis.Cluster("cluster-ha-with-labels", { * name: "ha-cluster", * shardCount: 3, * labels: { * my_key: "my_val", * other_key: "other_val", * }, * pscConfigs: [{ * network: consumerNet.id, * }], * region: "us-central1", * replicaCount: 1, * nodeType: "REDIS_SHARED_CORE_NANO", * transitEncryptionMode: "TRANSIT_ENCRYPTION_MODE_DISABLED", * authorizationMode: "AUTH_MODE_DISABLED", * redisConfigs: { * "maxmemory-policy": "volatile-ttl", * }, * deletionProtectionEnabled: true, * zoneDistributionConfig: { * mode: "MULTI_ZONE", * }, * maintenancePolicy: { * weeklyMaintenanceWindows: [{ * day: "MONDAY", * startTime: { * hours: 1, * minutes: 0, * seconds: 0, * nanos: 0, * }, * }], * }, * }, { * dependsOn: [_default], * }); * ``` * ### Redis Cluster Ha * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const consumerNet = new gcp.compute.Network("consumer_net", { * name: "my-network", * autoCreateSubnetworks: false, * }); * const consumerSubnet = new gcp.compute.Subnetwork("consumer_subnet", { * name: "my-subnet", * ipCidrRange: "10.0.0.248/29", * region: "us-central1", * network: consumerNet.id, * }); * const _default = new gcp.networkconnectivity.ServiceConnectionPolicy("default", { * name: "my-policy", * location: "us-central1", * serviceClass: "gcp-memorystore-redis", * description: "my basic service connection policy", * network: consumerNet.id, * pscConfig: { * subnetworks: [consumerSubnet.id], * }, * }); * const cluster_ha = new gcp.redis.Cluster("cluster-ha", { * name: "ha-cluster", * shardCount: 3, * pscConfigs: [{ * network: consumerNet.id, * }], * region: "us-central1", * replicaCount: 1, * nodeType: "REDIS_SHARED_CORE_NANO", * transitEncryptionMode: "TRANSIT_ENCRYPTION_MODE_DISABLED", * authorizationMode: "AUTH_MODE_DISABLED", * redisConfigs: { * "maxmemory-policy": "volatile-ttl", * }, * deletionProtectionEnabled: true, * zoneDistributionConfig: { * mode: "MULTI_ZONE", * }, * maintenancePolicy: { * weeklyMaintenanceWindows: [{ * day: "MONDAY", * startTime: { * hours: 1, * minutes: 0, * seconds: 0, * nanos: 0, * }, * }], * }, * }, { * dependsOn: [_default], * }); * ``` * ### Redis Cluster Ha Single Zone * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const consumerNet = new gcp.compute.Network("consumer_net", { * name: "my-network", * autoCreateSubnetworks: false, * }); * const consumerSubnet = new gcp.compute.Subnetwork("consumer_subnet", { * name: "my-subnet", * ipCidrRange: "10.0.0.248/29", * region: "us-central1", * network: consumerNet.id, * }); * const _default = new gcp.networkconnectivity.ServiceConnectionPolicy("default", { * name: "my-policy", * location: "us-central1", * serviceClass: "gcp-memorystore-redis", * description: "my basic service connection policy", * network: consumerNet.id, * pscConfig: { * subnetworks: [consumerSubnet.id], * }, * }); * const cluster_ha_single_zone = new gcp.redis.Cluster("cluster-ha-single-zone", { * name: "ha-cluster-single-zone", * shardCount: 3, * pscConfigs: [{ * network: consumerNet.id, * }], * region: "us-central1", * zoneDistributionConfig: { * mode: "SINGLE_ZONE", * zone: "us-central1-f", * }, * maintenancePolicy: { * weeklyMaintenanceWindows: [{ * day: "MONDAY", * startTime: { * hours: 1, * minutes: 0, * seconds: 0, * nanos: 0, * }, * }], * }, * deletionProtectionEnabled: true, * }, { * dependsOn: [_default], * }); * ``` * ### Redis Cluster Secondary * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const consumerNet = new gcp.compute.Network("consumer_net", { * name: "mynetwork", * autoCreateSubnetworks: false, * }); * const primaryClusterConsumerSubnet = new gcp.compute.Subnetwork("primary_cluster_consumer_subnet", { * name: "mysubnet-primary-cluster", * ipCidrRange: "10.0.1.0/29", * region: "us-east1", * network: consumerNet.id, * }); * const primaryClusterRegionScp = new gcp.networkconnectivity.ServiceConnectionPolicy("primary_cluster_region_scp", { * name: "mypolicy-primary-cluster", * location: "us-east1", * serviceClass: "gcp-memorystore-redis", * description: "Primary cluster service connection policy", * network: consumerNet.id, * pscConfig: { * subnetworks: [primaryClusterConsumerSubnet.id], * }, * }); * // Primary cluster * const primaryCluster = new gcp.redis.Cluster("primary_cluster", { * name: "my-primary-cluster", * region: "us-east1", * pscConfigs: [{ * network: consumerNet.id, * }], * authorizationMode: "AUTH_MODE_DISABLED", * transitEncryptionMode: "TRANSIT_ENCRYPTION_MODE_DISABLED", * shardCount: 3, * redisConfigs: { * "maxmemory-policy": "volatile-ttl", * }, * nodeType: "REDIS_HIGHMEM_MEDIUM", * persistenceConfig: { * mode: "RDB", * rdbConfig: { * rdbSnapshotPeriod: "ONE_HOUR", * rdbSnapshotStartTime: "2024-10-02T15:01:23Z", * }, * }, * zoneDistributionConfig: { * mode: "MULTI_ZONE", * }, * replicaCount: 1, * maintenancePolicy: { * weeklyMaintenanceWindows: [{ * day: "MONDAY", * startTime: { * hours: 1, * minutes: 0, * seconds: 0, * nanos: 0, * }, * }], * }, * deletionProtectionEnabled: true, * }, { * dependsOn: [primaryClusterRegionScp], * }); * const secondaryClusterConsumerSubnet = new gcp.compute.Subnetwork("secondary_cluster_consumer_subnet", { * name: "mysubnet-secondary-cluster", * ipCidrRange: "10.0.2.0/29", * region: "europe-west1", * network: consumerNet.id, * }); * const secondaryClusterRegionScp = new gcp.networkconnectivity.ServiceConnectionPolicy("secondary_cluster_region_scp", { * name: "mypolicy-secondary-cluster", * location: "europe-west1", * serviceClass: "gcp-memorystore-redis", * description: "Secondary cluster service connection policy", * network: consumerNet.id, * pscConfig: { * subnetworks: [secondaryClusterConsumerSubnet.id], * }, * }); * // Secondary cluster * const secondaryCluster = new gcp.redis.Cluster("secondary_cluster", { * name: "my-secondary-cluster", * region: "europe-west1", * pscConfigs: [{ * network: consumerNet.id, * }], * authorizationMode: "AUTH_MODE_DISABLED", * transitEncryptionMode: "TRANSIT_ENCRYPTION_MODE_DISABLED", * shardCount: 3, * redisConfigs: { * "maxmemory-policy": "volatile-ttl", * }, * nodeType: "REDIS_HIGHMEM_MEDIUM", * persistenceConfig: { * mode: "RDB", * rdbConfig: { * rdbSnapshotPeriod: "ONE_HOUR", * rdbSnapshotStartTime: "2024-10-02T15:01:23Z", * }, * }, * zoneDistributionConfig: { * mode: "MULTI_ZONE", * }, * replicaCount: 2, * maintenancePolicy: { * weeklyMaintenanceWindows: [{ * day: "WEDNESDAY", * startTime: { * hours: 1, * minutes: 0, * seconds: 0, * nanos: 0, * }, * }], * }, * deletionProtectionEnabled: true, * crossClusterReplicationConfig: { * clusterRole: "SECONDARY", * primaryCluster: { * cluster: primaryCluster.id, * }, * }, * }, { * dependsOn: [secondaryClusterRegionScp], * }); * ``` * ### Redis Cluster Rdb * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const consumerNet = new gcp.compute.Network("consumer_net", { * name: "my-network", * autoCreateSubnetworks: false, * }); * const consumerSubnet = new gcp.compute.Subnetwork("consumer_subnet", { * name: "my-subnet", * ipCidrRange: "10.0.0.248/29", * region: "us-central1", * network: consumerNet.id, * }); * const _default = new gcp.networkconnectivity.ServiceConnectionPolicy("default", { * name: "my-policy", * location: "us-central1", * serviceClass: "gcp-memorystore-redis", * description: "my basic service connection policy", * network: consumerNet.id, * pscConfig: { * subnetworks: [consumerSubnet.id], * }, * }); * const cluster_rdb = new gcp.redis.Cluster("cluster-rdb", { * name: "rdb-cluster", * shardCount: 3, * pscConfigs: [{ * network: consumerNet.id, * }], * region: "us-central1", * replicaCount: 0, * nodeType: "REDIS_SHARED_CORE_NANO", * transitEncryptionMode: "TRANSIT_ENCRYPTION_MODE_DISABLED", * authorizationMode: "AUTH_MODE_DISABLED", * redisConfigs: { * "maxmemory-policy": "volatile-ttl", * }, * deletionProtectionEnabled: true, * zoneDistributionConfig: { * mode: "MULTI_ZONE", * }, * maintenancePolicy: { * weeklyMaintenanceWindows: [{ * day: "MONDAY", * startTime: { * hours: 1, * minutes: 0, * seconds: 0, * nanos: 0, * }, * }], * }, * persistenceConfig: { * mode: "RDB", * rdbConfig: { * rdbSnapshotPeriod: "ONE_HOUR", * rdbSnapshotStartTime: "2024-10-02T15:01:23Z", * }, * }, * }, { * dependsOn: [_default], * }); * ``` * ### Redis Cluster Aof * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const consumerNet = new gcp.compute.Network("consumer_net", { * name: "my-network", * autoCreateSubnetworks: false, * }); * const consumerSubnet = new gcp.compute.Subnetwork("consumer_subnet", { * name: "my-subnet", * ipCidrRange: "10.0.0.248/29", * region: "us-central1", * network: consumerNet.id, * }); * const _default = new gcp.networkconnectivity.ServiceConnectionPolicy("default", { * name: "my-policy", * location: "us-central1", * serviceClass: "gcp-memorystore-redis", * description: "my basic service connection policy", * network: consumerNet.id, * pscConfig: { * subnetworks: [consumerSubnet.id], * }, * }); * const cluster_aof = new gcp.redis.Cluster("cluster-aof", { * name: "aof-cluster", * shardCount: 3, * pscConfigs: [{ * network: consumerNet.id, * }], * region: "us-central1", * replicaCount: 0, * nodeType: "REDIS_SHARED_CORE_NANO", * transitEncryptionMode: "TRANSIT_ENCRYPTION_MODE_DISABLED", * authorizationMode: "AUTH_MODE_DISABLED", * redisConfigs: { * "maxmemory-policy": "volatile-ttl", * }, * deletionProtectionEnabled: true, * zoneDistributionConfig: { * mode: "MULTI_ZONE", * }, * maintenancePolicy: { * weeklyMaintenanceWindows: [{ * day: "MONDAY", * startTime: { * hours: 1, * minutes: 0, * seconds: 0, * nanos: 0, * }, * }], * }, * persistenceConfig: { * mode: "AOF", * aofConfig: { * appendFsync: "EVERYSEC", * }, * }, * }, { * dependsOn: [_default], * }); * ``` * ### Redis Cluster Cmek * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const consumerNet = new gcp.compute.Network("consumer_net", { * name: "my-network", * autoCreateSubnetworks: false, * }); * const consumerSubnet = new gcp.compute.Subnetwork("consumer_subnet", { * name: "my-subnet", * ipCidrRange: "10.0.0.248/29", * region: "us-central1", * network: consumerNet.id, * }); * const _default = new gcp.networkconnectivity.ServiceConnectionPolicy("default", { * name: "my-policy", * location: "us-central1", * serviceClass: "gcp-memorystore-redis", * description: "my basic service connection policy", * network: consumerNet.id, * pscConfig: { * subnetworks: [consumerSubnet.id], * }, * }); * const cluster_cmek = new gcp.redis.Cluster("cluster-cmek", { * name: "cmek-cluster", * shardCount: 3, * pscConfigs: [{ * network: consumerNet.id, * }], * kmsKey: "my-key", * region: "us-central1", * deletionProtectionEnabled: true, * }, { * dependsOn: [_default], * }); * const project = gcp.organizations.getProject({}); * ``` * * ## Import * * Cluster can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{region}}/clusters/{{name}}` * * `{{project}}/{{region}}/{{name}}` * * `{{region}}/{{name}}` * * `{{name}}` * * When using the `pulumi import` command, Cluster can be imported using one of the formats above. For example: * * ```sh * $ 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}} * ``` */ export declare class Cluster extends pulumi.CustomResource { /** * Get an existing Cluster resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ClusterState, opts?: pulumi.CustomResourceOptions): Cluster; /** * Returns true if the given object is an instance of Cluster. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Cluster; /** * 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`. */ readonly authorizationMode: pulumi.Output; /** * The automated backup config for a instance. * Structure is documented below. */ readonly automatedBackupConfig: pulumi.Output; /** * This field is used to determine the available maintenance versions for the self service update. */ readonly availableMaintenanceVersions: pulumi.Output; /** * The backup collection full resource name. * Example: projects/{project}/locations/{location}/backupCollections/{collection} */ readonly backupCollection: pulumi.Output; /** * 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". */ readonly createTime: pulumi.Output; /** * Cross cluster replication config * Structure is documented below. */ readonly crossClusterReplicationConfig: pulumi.Output; /** * Optional. Indicates if the cluster is deletion protected or not. * If the value if set to true, any delete cluster operation will fail. * Default value is true. */ readonly deletionProtectionEnabled: pulumi.Output; /** * 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. */ readonly discoveryEndpoints: pulumi.Output; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * This field represents the actual maintenance version of the cluster. */ readonly effectiveMaintenanceVersion: pulumi.Output; /** * Backups stored in Cloud Storage buckets. The Cloud Storage buckets need to be the same region as the clusters. * Structure is documented below. */ readonly gcsSource: pulumi.Output; /** * The KMS key used to encrypt the at-rest data of the cluster. */ readonly kmsKey: pulumi.Output; /** * Resource labels to represent user provided metadata. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Maintenance policy for a cluster * Structure is documented below. */ readonly maintenancePolicy: pulumi.Output; /** * Upcoming maintenance schedule. * Structure is documented below. */ readonly maintenanceSchedules: pulumi.Output; /** * This field can be used to trigger self service update to indicate the desired maintenance version. The input to this field can be determined by the availableMaintenanceVersions field. * *Note*: This field can only be specified when updating an existing cluster to a newer version. Downgrades are currently not supported! */ readonly maintenanceVersion: pulumi.Output; /** * Backups that generated and managed by memorystore. * Structure is documented below. */ readonly managedBackupSource: pulumi.Output; /** * Cluster's Certificate Authority. This field will only be populated if Redis Cluster's transitEncryptionMode is TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION * Structure is documented below. */ readonly managedServerCas: pulumi.Output; /** * Unique name of the resource in this scope including project and location using the form: * projects/{projectId}/locations/{locationId}/clusters/{clusterId} */ readonly name: pulumi.Output; /** * The nodeType for the Redis cluster. * If not provided, REDIS_HIGHMEM_MEDIUM will be used as default * Possible values are: `REDIS_SHARED_CORE_NANO`, `REDIS_HIGHMEM_MEDIUM`, `REDIS_HIGHMEM_XLARGE`, `REDIS_STANDARD_SMALL`. */ readonly nodeType: pulumi.Output; /** * Persistence config (RDB, AOF) for the cluster. * Structure is documented below. */ readonly persistenceConfig: pulumi.Output; /** * Output only. Redis memory precise size in GB for the entire cluster. */ readonly preciseSizeGb: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * 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. */ readonly pscConfigs: pulumi.Output; /** * Output only. PSC connections for discovery of the cluster topology and accessing the cluster. * Structure is documented below. */ readonly pscConnections: pulumi.Output; /** * Service attachment details to configure Psc connections. * Structure is documented below. */ readonly pscServiceAttachments: pulumi.Output; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * Configure Redis Cluster behavior using a subset of native Redis configuration parameters. * Please check Memorystore documentation for the list of supported parameters: * https://cloud.google.com/memorystore/docs/cluster/supported-instance-configurations */ readonly redisConfigs: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The name of the region of the Redis cluster. */ readonly region: pulumi.Output; /** * Optional. The number of replica nodes per shard. */ readonly replicaCount: pulumi.Output; /** * Required. Number of shards for the Redis cluster. */ readonly shardCount: pulumi.Output; /** * Output only. Redis memory size in GB for the entire cluster. */ readonly sizeGb: pulumi.Output; /** * The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED */ readonly state: pulumi.Output; /** * Output only. Additional information about the current state of the cluster. * Structure is documented below. */ readonly stateInfos: pulumi.Output; /** * 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`. */ readonly transitEncryptionMode: pulumi.Output; /** * System assigned, unique identifier for the cluster. */ readonly uid: pulumi.Output; /** * Immutable. Zone distribution config for Memorystore Redis cluster. * Structure is documented below. */ readonly zoneDistributionConfig: pulumi.Output; /** * Create a Cluster resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Cluster resources. */ export interface ClusterState { /** * 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`. */ authorizationMode?: pulumi.Input; /** * The automated backup config for a instance. * Structure is documented below. */ automatedBackupConfig?: pulumi.Input; /** * This field is used to determine the available maintenance versions for the self service update. */ availableMaintenanceVersions?: pulumi.Input[]>; /** * The backup collection full resource name. * Example: projects/{project}/locations/{location}/backupCollections/{collection} */ backupCollection?: pulumi.Input; /** * 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". */ createTime?: pulumi.Input; /** * Cross cluster replication config * Structure is documented below. */ crossClusterReplicationConfig?: pulumi.Input; /** * Optional. Indicates if the cluster is deletion protected or not. * If the value if set to true, any delete cluster operation will fail. * Default value is true. */ deletionProtectionEnabled?: pulumi.Input; /** * 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. */ discoveryEndpoints?: pulumi.Input[]>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * This field represents the actual maintenance version of the cluster. */ effectiveMaintenanceVersion?: pulumi.Input; /** * Backups stored in Cloud Storage buckets. The Cloud Storage buckets need to be the same region as the clusters. * Structure is documented below. */ gcsSource?: pulumi.Input; /** * The KMS key used to encrypt the at-rest data of the cluster. */ kmsKey?: pulumi.Input; /** * Resource labels to represent user provided metadata. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Maintenance policy for a cluster * Structure is documented below. */ maintenancePolicy?: pulumi.Input; /** * Upcoming maintenance schedule. * Structure is documented below. */ maintenanceSchedules?: pulumi.Input[]>; /** * This field can be used to trigger self service update to indicate the desired maintenance version. The input to this field can be determined by the availableMaintenanceVersions field. * *Note*: This field can only be specified when updating an existing cluster to a newer version. Downgrades are currently not supported! */ maintenanceVersion?: pulumi.Input; /** * Backups that generated and managed by memorystore. * Structure is documented below. */ managedBackupSource?: pulumi.Input; /** * Cluster's Certificate Authority. This field will only be populated if Redis Cluster's transitEncryptionMode is TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION * Structure is documented below. */ managedServerCas?: pulumi.Input[]>; /** * Unique name of the resource in this scope including project and location using the form: * projects/{projectId}/locations/{locationId}/clusters/{clusterId} */ name?: pulumi.Input; /** * The nodeType for the Redis cluster. * If not provided, REDIS_HIGHMEM_MEDIUM will be used as default * Possible values are: `REDIS_SHARED_CORE_NANO`, `REDIS_HIGHMEM_MEDIUM`, `REDIS_HIGHMEM_XLARGE`, `REDIS_STANDARD_SMALL`. */ nodeType?: pulumi.Input; /** * Persistence config (RDB, AOF) for the cluster. * Structure is documented below. */ persistenceConfig?: pulumi.Input; /** * Output only. Redis memory precise size in GB for the entire cluster. */ preciseSizeGb?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * 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. */ pscConfigs?: pulumi.Input[]>; /** * Output only. PSC connections for discovery of the cluster topology and accessing the cluster. * Structure is documented below. */ pscConnections?: pulumi.Input[]>; /** * Service attachment details to configure Psc connections. * Structure is documented below. */ pscServiceAttachments?: pulumi.Input[]>; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Configure Redis Cluster behavior using a subset of native Redis configuration parameters. * Please check Memorystore documentation for the list of supported parameters: * https://cloud.google.com/memorystore/docs/cluster/supported-instance-configurations */ redisConfigs?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The name of the region of the Redis cluster. */ region?: pulumi.Input; /** * Optional. The number of replica nodes per shard. */ replicaCount?: pulumi.Input; /** * Required. Number of shards for the Redis cluster. */ shardCount?: pulumi.Input; /** * Output only. Redis memory size in GB for the entire cluster. */ sizeGb?: pulumi.Input; /** * The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED */ state?: pulumi.Input; /** * Output only. Additional information about the current state of the cluster. * Structure is documented below. */ stateInfos?: pulumi.Input[]>; /** * 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`. */ transitEncryptionMode?: pulumi.Input; /** * System assigned, unique identifier for the cluster. */ uid?: pulumi.Input; /** * Immutable. Zone distribution config for Memorystore Redis cluster. * Structure is documented below. */ zoneDistributionConfig?: pulumi.Input; } /** * The set of arguments for constructing a Cluster resource. */ export interface ClusterArgs { /** * 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`. */ authorizationMode?: pulumi.Input; /** * The automated backup config for a instance. * Structure is documented below. */ automatedBackupConfig?: pulumi.Input; /** * Cross cluster replication config * Structure is documented below. */ crossClusterReplicationConfig?: pulumi.Input; /** * Optional. Indicates if the cluster is deletion protected or not. * If the value if set to true, any delete cluster operation will fail. * Default value is true. */ deletionProtectionEnabled?: pulumi.Input; /** * Backups stored in Cloud Storage buckets. The Cloud Storage buckets need to be the same region as the clusters. * Structure is documented below. */ gcsSource?: pulumi.Input; /** * The KMS key used to encrypt the at-rest data of the cluster. */ kmsKey?: pulumi.Input; /** * Resource labels to represent user provided metadata. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Maintenance policy for a cluster * Structure is documented below. */ maintenancePolicy?: pulumi.Input; /** * This field can be used to trigger self service update to indicate the desired maintenance version. The input to this field can be determined by the availableMaintenanceVersions field. * *Note*: This field can only be specified when updating an existing cluster to a newer version. Downgrades are currently not supported! */ maintenanceVersion?: pulumi.Input; /** * Backups that generated and managed by memorystore. * Structure is documented below. */ managedBackupSource?: pulumi.Input; /** * Unique name of the resource in this scope including project and location using the form: * projects/{projectId}/locations/{locationId}/clusters/{clusterId} */ name?: pulumi.Input; /** * The nodeType for the Redis cluster. * If not provided, REDIS_HIGHMEM_MEDIUM will be used as default * Possible values are: `REDIS_SHARED_CORE_NANO`, `REDIS_HIGHMEM_MEDIUM`, `REDIS_HIGHMEM_XLARGE`, `REDIS_STANDARD_SMALL`. */ nodeType?: pulumi.Input; /** * Persistence config (RDB, AOF) for the cluster. * Structure is documented below. */ persistenceConfig?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * 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. */ pscConfigs?: pulumi.Input[]>; /** * Configure Redis Cluster behavior using a subset of native Redis configuration parameters. * Please check Memorystore documentation for the list of supported parameters: * https://cloud.google.com/memorystore/docs/cluster/supported-instance-configurations */ redisConfigs?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The name of the region of the Redis cluster. */ region?: pulumi.Input; /** * Optional. The number of replica nodes per shard. */ replicaCount?: pulumi.Input; /** * Required. Number of shards for the Redis cluster. */ shardCount: pulumi.Input; /** * 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`. */ transitEncryptionMode?: pulumi.Input; /** * Immutable. Zone distribution config for Memorystore Redis cluster. * Structure is documented below. */ zoneDistributionConfig?: pulumi.Input; }