This module deploys a Google Cloud Memorystore for Redis instance.
- id: redis
source: modules/database/redis
settings:
project_id: "your-project-id"
deployment_name: "my-deployment"
environment: "dev"
region: "us-central1"
network_self_link: "projects/your-project-id/global/networks/your-network"Copyright 2026 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
| Name | Version |
|---|---|
| terraform | = 1.12.2 |
| >= 3.83 |
| Name | Version |
|---|---|
| >= 3.83 |
No modules.
| Name | Type |
|---|---|
| google_project_service.redis_api | resource |
| google_redis_instance.default | resource |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| auth_enabled | Indicates whether OSS Redis AUTH is enabled. | bool |
true |
no |
| connect_mode | The connection mode of the Redis instance. | string |
"DIRECT_PEERING" |
no |
| deploy_redis | Whether to deploy Redis. | bool |
true |
no |
| deployment_name | The name of the current deployment. | string |
n/a | yes |
| environment | The environment name. | string |
n/a | yes |
| memory_size_gb | Redis memory size in GiB. Defaults to 2 GiB as a safe minimal baseline for general caching workloads. | number |
2 |
no |
| network_self_link | The VPC network to which the instance is connected. | string |
n/a | yes |
| project_id | The project ID to deploy to. | string |
n/a | yes |
| redis_version | The version of Redis software. | string |
"REDIS_6_X" |
no |
| region | The region to deploy Redis to. | string |
n/a | yes |
| reserved_ip_range | The name of the allocated IP range for the Private Service Access. | string |
null |
no |
| tier | The service tier of the Redis instance. | string |
"BASIC" |
no |
| Name | Description |
|---|---|
| auth_string | The auth string (password) of the Redis instance. |
| redis_host | The host of the Redis instance. |
| redis_port | The port of the Redis instance. |