# terraform-kubernetes-redis **Repository Path**: walrus-catalog/terraform-kubernetes-redis ## Basic Information - **Project Name**: terraform-kubernetes-redis - **Description**: Deploy containerized Redis service on Kubernetes. - **Primary Language**: Shell - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-27 - **Last Updated**: 2024-02-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: t-redis, c-kubernetes, walrus-resource-definition ## README # Kubernetes Redis Template Terraform module which deploys containerized Redis on Kubernetes, powered by [Bitnami Charts/Redis](https://github.com/bitnami/charts/tree/main/bitnami/redis). - [x] Support standalone(one read-write instance) and replication(one read-write instance and multiple read-only instances, for read write splitting). ## Usage ```hcl module "redis" { source = "..." infrastructure = { namespace = "default" } architecture = "replication" engine_version = "7.0" # https://hub.docker.com/r/bitnami/redis/tags } ``` ## Examples - [Replication](./examples/replication) - [Standalone](./examples/standalone) ## Contributing Please read our [contributing guide](./docs/CONTRIBUTING.md) if you're interested in contributing to Walrus template. ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | | [helm](#requirement\_helm) | >= 2.0.0 | | [random](#requirement\_random) | >= 3.5.1 | ## Providers | Name | Version | |------|---------| | [helm](#provider\_helm) | >= 2.0.0 | | [random](#provider\_random) | >= 3.5.1 | ## Modules No modules. ## Resources | Name | Type | |------|------| | [helm_release.redis](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | | [random_password.password](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) | resource | | [random_string.name_suffix](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [architecture](#input\_architecture) | Specify the deployment architecture, select from standalone or replication. | `string` | `"standalone"` | no | | [context](#input\_context) | Receive contextual information. When Walrus deploys, Walrus will inject specific contextual information into this field.

Examples:
context:
project:
name: string
id: string
environment:
name: string
id: string
resource:
name: string
id: string
| `map(any)` | `{}` | no | | [engine\_version](#input\_engine\_version) | Specify the deployment engine version, select from https://hub.docker.com/r/bitnami/redis/tags. | `string` | `"7.0"` | no | | [infrastructure](#input\_infrastructure) | Specify the infrastructure information for deploying.

Examples:
infrastructure:
namespace: string, optional
image_registry: string, optional
domain_suffix: string, optional
service_type: string, optional
|
object({
namespace = optional(string)
image_registry = optional(string, "registry-1.docker.io")
domain_suffix = optional(string, "cluster.local")
service_type = optional(string, "ClusterIP")
})
| `{}` | no | | [password](#input\_password) | Specify the account password. The password must be 16-32 characters long and start with any letter, number, or the following symbols: ! # $ % ^ & * ( ) \_ + - =.
If not specified, it will generate a random password. | `string` | `null` | no | | [replication\_readonly\_replicas](#input\_replication\_readonly\_replicas) | Specify the number of read-only replicas under the replication deployment. | `number` | `1` | no | | [resources](#input\_resources) | Specify the computing resources.

Examples:
resources:
cpu: number, optional
memory: number, optional # in megabyte
|
object({
cpu = optional(number, 0.25)
memory = optional(number, 1024)
})
|
{
"cpu": 0.25,
"memory": 1024
}
| no | | [storage](#input\_storage) | Specify the storage resources.

Examples:
storage:                         # convert to empty_dir volume or dynamic volume claim template
class: string, optional
size: number, optional # in megabyte
|
object({
class = optional(string)
size = optional(number, 10 * 1024)
})
| `null` | no | ## Outputs | Name | Description | |------|-------------| | [address](#output\_address) | The address, a string only has host, might be a comma separated string or a single string. | | [address\_readonly](#output\_address\_readonly) | The readonly host, a string only has host, might be a comma separated string or a single string. | | [connection](#output\_connection) | The connection, a string combined host and port, might be a comma separated string or a single string. | | [connection\_readonly](#output\_connection\_readonly) | The readonly connection, a string combined host and port, might be a comma separated string or a single string. | | [context](#output\_context) | The input context, a map, which is used for orchestration. | | [password](#output\_password) | The password of the account to access the service. | | [port](#output\_port) | The port of the service. | | [refer](#output\_refer) | The refer, a map, including hosts, ports and account, which is used for dependencies or collaborations. | ## License Copyright (c) 2023 [Seal, Inc.](https://seal.io) 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 [LICENSE](./LICENSE) file for details. 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.