An open API service indexing awesome lists of open source software.

https://github.com/geekcell/terraform-aws-memorydb-cluster

Terraform module to provision an AWS MemoryDB Cluster.
https://github.com/geekcell/terraform-aws-memorydb-cluster

aws database memorydb memorydb-cluster terraform terraform-module

Last synced: 11 months ago
JSON representation

Terraform module to provision an AWS MemoryDB Cluster.

Awesome Lists containing this project

README

          

[![Geek Cell GmbH](https://raw.githubusercontent.com/geekcell/.github/main/geekcell-github-banner.png)](https://www.geekcell.io/)

### Code Quality
[![License](https://img.shields.io/github/license/geekcell/terraform-aws-memorydb-cluster)](https://github.com/geekcell/terraform-aws-memorydb-cluster/blob/master/LICENSE)
[![GitHub release (latest tag)](https://img.shields.io/github/v/release/geekcell/terraform-aws-memorydb-cluster?logo=github&sort=semver)](https://github.com/geekcell/terraform-aws-memorydb-cluster/releases)
[![Release](https://github.com/geekcell/terraform-aws-memorydb-cluster/actions/workflows/release.yaml/badge.svg)](https://github.com/geekcell/terraform-aws-memorydb-cluster/actions/workflows/release.yaml)
[![Validate](https://github.com/geekcell/terraform-aws-memorydb-cluster/actions/workflows/validate.yaml/badge.svg)](https://github.com/geekcell/terraform-aws-memorydb-cluster/actions/workflows/validate.yaml)
[![Lint](https://github.com/geekcell/terraform-aws-memorydb-cluster/actions/workflows/linter.yaml/badge.svg)](https://github.com/geekcell/terraform-aws-memorydb-cluster/actions/workflows/linter.yaml)

# Terraform AWS MemoryDB Cluster

Terraform module which creates a MemoryDB Cluster. The focus on this module lies within it's simplicity by providing
default values that should make sense for most use cases.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [auto\_minor\_version\_upgrade](#input\_auto\_minor\_version\_upgrade) | When set to true, the cluster will automatically receive minor engine version upgrades after launch. | `bool` | `true` | no |
| [description](#input\_description) | Description for the cluster. | `string` | n/a | yes |
| [engine\_version](#input\_engine\_version) | Version number of the Redis engine to be used for the cluster. | `string` | n/a | yes |
| [maintenance\_window](#input\_maintenance\_window) | Specifies the weekly time range during which maintenance on the cluster is performed. | `string` | `"sun:23:00-mon:01:30"` | no |
| [name](#input\_name) | Name of the cluster. | `string` | n/a | yes |
| [node\_type](#input\_node\_type) | The compute and memory capacity of the nodes in the cluster. | `string` | n/a | yes |
| [num\_replicas\_per\_shard](#input\_num\_replicas\_per\_shard) | The number of replicas to apply to each shard. | `number` | n/a | yes |
| [num\_shards](#input\_num\_shards) | The number of shards in the cluster. | `number` | n/a | yes |
| [parameters](#input\_parameters) | A list of parameters to apply to the cluster. |

list(object({
name = string
value = string
}))
|
[
{
"name": "activedefrag",
"value": "yes"
}
]
| no |
| [port](#input\_port) | The port number on which each of the nodes accepts connections. | `number` | `6379` | no |
| [recipients](#input\_recipients) | List of email addresses to notify when the cluster is in an unhealthy state. | `list(string)` | `[]` | no |
| [security\_group\_ids](#input\_security\_group\_ids) | Set of VPC Security Group ID-s to associate with this cluster. | `list(string)` | n/a | yes |
| [snapshot\_retention\_limit](#input\_snapshot\_retention\_limit) | The number of days for which MemoryDB retains automatic snapshots before deleting them. | `number` | `0` | no |
| [snapshot\_window](#input\_snapshot\_window) | The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. | `string` | `"05:00-09:00"` | no |
| [subnet\_ids](#input\_subnet\_ids) | List of VPC subnet ID-s to associate with this cluster. | `list(string)` | n/a | yes |
| [tags](#input\_tags) | Tags to add to the AWS Customer Managed Key. | `map(any)` | `{}` | no |
| [tls\_enabled](#input\_tls\_enabled) | A flag to enable in-transit encryption on the cluster. | `bool` | `true` | no |
| [users](#input\_users) | A map of users to create in the cluster. |
map(
object(
{
access_string = string,
tags = map(string)
}
)
)
|
{
"admin": {
"access_string": "on ~* &* +@all",
"tags": {
"user": "admin"
}
},
"readonly": {
"access_string": "on ~* &* -@all +@read",
"tags": {
"user": "readonly"
}
}
}
| no |

## Outputs

| Name | Description |
|------|-------------|
| [arn](#output\_arn) | The ARN of the cluster. |
| [cluster\_endpoint\_address](#output\_cluster\_endpoint\_address) | DNS hostname of the cluster configuration endpoint. |
| [cluster\_endpoint\_port](#output\_cluster\_endpoint\_port) | Port number that the cluster configuration endpoint is listening on. |
| [name](#output\_name) | The name of the Memory DB Cluster. |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 4.36 |

## Resources

- resource.aws_memorydb_cluster.main (main.tf#7)

# Examples
### Full
```hcl
module "basic-example" {
source = "../../"

description = "PHP Sessions"
engine_version = "6.2"
name = "session"
node_type = "db.t4g.small"
num_replicas_per_shard = 0
num_shards = 1
security_group_ids = ["sg-123456789"]
subnet_ids = ["subnet-123456789", "subnet-987654321"]
}
```