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.
Name
Description
Type
Default
Required
auto_minor_version_upgrade
When set to true, the cluster will automatically receive minor engine version upgrades after launch.
bool
true
no
description
Description for the cluster.
string
n/a
yes
engine_version
Version number of the Redis engine to be used for the cluster.
string
n/a
yes
maintenance_window
Specifies the weekly time range during which maintenance on the cluster is performed.
string
"sun:23:00-mon:01:30"
no
name
Name of the cluster.
string
n/a
yes
node_type
The compute and memory capacity of the nodes in the cluster.
string
n/a
yes
num_replicas_per_shard
The number of replicas to apply to each shard.
number
n/a
yes
num_shards
The number of shards in the cluster.
number
n/a
yes
parameters
A list of parameters to apply to the cluster.
list(object({ name = string value = string }))
[ { "name": "activedefrag", "value": "yes" } ]
no
port
The port number on which each of the nodes accepts connections.
number
6379
no
recipients
List of email addresses to notify when the cluster is in an unhealthy state.
list(string)
[]
no
security_group_ids
Set of VPC Security Group ID-s to associate with this cluster.
list(string)
n/a
yes
snapshot_retention_limit
The number of days for which MemoryDB retains automatic snapshots before deleting them.
number
0
no
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
List of VPC subnet ID-s to associate with this cluster.
list(string)
n/a
yes
tags
Tags to add to the AWS Customer Managed Key.
map(any)
{}
no
tls_enabled
A flag to enable in-transit encryption on the cluster.
bool
true
no
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
resource.aws_memorydb_cluster.main (main.tf#7)
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" ]
}