Configure a Memorystore for Redis Cluster

In Application Design Center, you can configure a Memorystore for Redis Cluster to provide horizontally scalable, high-availability Redis caching that shards data across primary nodes and replicates it across optional replica nodes. You can customize the cluster's component connections and configuration parameters based on the terraform-google-memorystore Terraform module on GitHub.

Component connections

The following table includes the components that you can connect to a Memorystore for Redis Cluster instance, and the resulting updates to your application and its generated Terraform code.

Connected component Application updates Background information

Cloud Run

  • The Cloud Run service can cache data in the Memorystore for Redis Cluster instance.
  • The Memorystore for Redis Cluster connection information is added to the Cloud Run environment variables.
  • The roles/redis.dbConnectionUser role is granted to the Cloud Run service account.
Connect to a Memorystore for Redis Cluster instance

Compute Engine instance template

  • The instance template can cache data in the Memorystore for Redis Cluster instance.
  • App Design Center adds the Memorystore for Redis Cluster connection information to the compute instance metadata.
Connect to a Memorystore for Redis Cluster instance

Service account

  • The service account can manage the Memorystore for Redis Cluster instance.
  • App Design Center grants the Cloud Memorystore Redis Editor role (roles/redis.editor) to the service account.
About Identity and Access Management (IAM) authentication

Virtual Private Cloud (VPC) network

  • App Design Center deploys the Memorystore for Redis Cluster instance into the selected VPC network.
  • App Design Center adds the VPC network information to the Memorystore for Redis Cluster network parameters.
Networking setup guidance

Required configuration parameters

If your template includes a Memorystore for Redis Cluster component, you must configure the following parameters before you deploy.

Parameter name Description and constraints Background information

Name

name Create instances

Project ID

The project where you want to deploy the Memorystore for Redis Cluster resource.

Configure components

Region

locationId Supported regions

Network

network Networking setup guidance

Optional configuration parameters

The following parameters are optional. To display advanced parameters, in the Configuration area, select Show advanced fields.

Feature Parameter name Description and constraint information Background information

Shard Count

shardCount Shards

Replica Count

replicaCount Primary and replica nodes

Transit Encryption Mode

transitEncryptionMode About in-transit encryption

Authorization Mode

authorizationMode About IAM authentication

Node Type

nodeType Cluster and node specification

Zone Distribution Config Mode

mode Single-zone instances
Maintenance Window

Day

day About maintenance on Memorystore for Redis Cluster
Maintenance Window

Hours

hours About maintenance on Memorystore for Redis Cluster
Maintenance Window

Minutes

minutes About maintenance on Memorystore for Redis Cluster
Maintenance Window

Seconds

seconds About maintenance on Memorystore for Redis Cluster
Maintenance Window

Nanos

nanos About maintenance on Memorystore for Redis Cluster
Persistence Config

Persistence Mode

persistenceMode Persistence overview
Persistence Config

RDB Snapshot Period

rdbSnapshotPeriod About RDB snapshots
Persistence Config

RDB Snapshot Start Time

rdbSnapshotStartTime About RDB snapshots
Persistence Config

AOF Config

AofConfig About AOF snapshots

Enable APIs

By default, enables the redis.googleapis.com API.

Google Cloud Memorystore for Redis Cluster API

Service Connection Policy

ServiceConnectionPolicy Create a service connection policy
Redis Config

Max Memory Clients

redisConfigs Modifiable configuration parameters
Redis Config

Max Memory

redisConfigs Modifiable configuration parameters
Redis Config

Max Memory Policy

redisConfigs Modifiable configuration parameters
Redis Config

Notify Key Space Events

redisConfigs Modifiable configuration parameters
Redis Config

Slow Log - Log Slower Than

redisConfigs Modifiable configuration parameters
Redis Config

Max Clients

redisConfigs Modifiable configuration parameters

Zone Distribution Config Zone

zone Single-zone instances

Deletion Protection Enabled

By default, enables the cluster deletion protection.

Prevent deletion of a cluster

KMS Key

customerManagedKey Use customer-managed encryption keys (CMEK)
Labels

Key

label

Overview of labels
Labels

Value

label

Overview of labels

Cross-region replication parameters

The following parameters configure cross-region replication for your cluster.

Parameter name Description and constraints Background information

Cluster Role

clusterRole About cross-region replication

Primary Cluster

primaryCluster About cross-region replication

Secondary Clusters

secondaryClusters About cross-region replication

For instructions on performing cross-region replication operations—such as attach, switchover, and detach—see the google_redis_cluster resource documentation in the Terraform Registry.