Configure a Memorystore for Valkey instance

Memorystore for Valkey is a fully managed Valkey service for Google Cloud which supports both Cluster Mode Enabled and Cluster Mode Disabled instances. Applications running on Google Cloud can achieve extreme performance by leveraging the highly scalable, available, and secure Valkey service without the burden of managing complex Valkey deployments. For more information, see Memorystore for Valkey overview.

This document describes the connections and parameters you can configure when using App Design Center to create a Memorystore for Valkey instance. The configuration parameters are based on the terraform-google-memorystore Terraform module.

Component connections

The following table includes the components that you can connect to a Memorystore for Valkey 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 Valkey instance.
  • App Design Center adds the Memorystore for Valkey connection information to the Cloud Run environment variables.
  • App Design Center adds the roles/memorystore.dbConnectionUser role to the Cloud Run service account.
Connect to a Memorystore for Valkey instance

Compute Engine instance template

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

Service Account

  • App Design Center adds the roles/memorystore.editor role to the service account credentials to let the service account manage the instance.
Connect to a Memorystore for Valkey instance

VPC network

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

KMS key

  • The Memorystore for Valkey instance uses the connected KMS key for data-at-rest encryption.
  • App Design Center passes the KMS key ID into the Memorystore for Valkey instance configuration.
Use customer-managed encryption keys (CMEK)

Required configuration parameters

If your template includes a Memorystore for Valkey 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 Valkey 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 Instance and node specification

Zone distribution configuration mode

mode Single-zone instances

Maintenance windows

Day

day About maintenance on Memorystore for Valkey

Hours

hours About maintenance on Memorystore for Valkey

Minutes

minutes About maintenance on Memorystore for Valkey

Seconds

seconds About maintenance on Memorystore for Valkey

Nanos

nanos About maintenance on Memorystore for Valkey

Persistence configuration

Persistence mode

persistenceMode Persistence overview

RDB snapshot period

rdbSnapshotPeriod About RDB snapshots

RDB snapshot start time

rdbSnapshotStartTime About RDB snapshots

AOF configuration

aofConfig About AOF snapshots

Enable APIs

App Design Center enables the memorystore.googleapis.com API by default.

Google Cloud Memorystore for Valkey API

Service connection policy

ServiceConnectionPolicy Create a service connection policy

Engine configuration

maxmemory-clients

engineConfigs Modifiable configuration parameters

maxmemory

engineConfigs Modifiable configuration parameters

maxmemory-policy

engineConfigs Modifiable configuration parameters

notify-keyspace-events

engineConfigs Modifiable configuration parameters

slowlog-log-slower-than

engineConfigs Modifiable configuration parameters

maxclients

engineConfigs Modifiable configuration parameters

databases

engineConfigs Modifiable configuration parameters

cluster-databases

engineConfigs Modifiable configuration parameters

Zone distribution configuration zone

zone Single-zone instances

Deletion protection enabled

App Design Center enables cluster deletion protection by default.

Prevent deletion of a cluster

KMS key

customerManagedKey Use customer-managed encryption keys (CMEK)

Labels

Key

label

Create and manage labels

Value

label

Create and manage labels

Zonal distribution configuration mode

Zone distribution mode Single-zone instances

Cluster mode

mode Enable and disable cluster mode

Engine version

engineVersion Supported versions

Server CA mode

serverCaMode Certificate Authorities

Server CA pool

serverCaPool Secure your data by using a customer-managed Certificate Authority (CA)

Network project

The project that hosts the shared VPC network.

Shared VPC overview

Maintenance version

maintenanceVersion About maintenance on Memorystore for Valkey

Backup configuration

Automated backup configuration

automatedBackupConfig About backups

Cloud Storage source

uri About backups

Managed backup source

managedBackupSource About backups

Cross region replication parameters

Parameter name

Description and constraints

Background information

Instance role

instanceRole About cross-region replication

Primary cluster

primaryInstance About cross-region replication

Secondary clusters

secondaryInstance About cross-region replication

For more information about performing cross-region replication operations—such as attach, switchover, and detach—see the Terraform google_memorystore_instance resource documentation.