Module library

ElastiCache

Terraform module to create AWS ElastiCache resources

Version
Submodules
serverless-cacheuser-group

Inputs

40 / 68
apply_immediatelyoptionalbool

Whether any database modifications are applied immediately, or during the next maintenance window. Default is `false`

Defaultnull
at_rest_encryption_enabledoptionalbool

Whether to enable encryption at rest

Defaulttrue
auth_tokenoptionalstring

The password used to access a password protected server. Can be specified only if `transit_encryption_enabled = true`

Defaultnull
auth_token_update_strategyoptionalstring

Strategy to use when updating the `auth_token`. Valid values are `SET`, `ROTATE`, and `DELETE`. Defaults to `ROTATE`

Defaultnull
auto_minor_version_upgradeoptionalbool

Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. Only supported for engine type `redis` and `valkey` and if the engine version is 6 or higher. Defaults to `true`

Defaultnull
automatic_failover_enabledoptionalbool

Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. If true, Multi-AZ is enabled for this replication group. If false, Multi-AZ is disabled for this replication group. Must be enabled for Redis (cluster mode enabled) replication g…

Defaultnull
availability_zoneoptionalstring

Availability Zone for the cache cluster. If you want to create cache nodes in multi-az, use `preferred_availability_zones` instead

Defaultnull
az_modeoptionalstring

Whether the nodes in this Memcached node group are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region. Valid values for this parameter are `single-az` or `cross-az`, default is `single-az`

Defaultnull
cluster_idoptionalstring

Group identifier. ElastiCache converts this name to lowercase. Changing this value will re-create the resource

Default""
cluster_modeoptionalstring

Specifies whether cluster mode is enabled or disabled. Valid values are enabled or disabled or compatible

Defaultnull
cluster_mode_enabledoptionalbool

Whether to enable Redis [cluster mode https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Replication.Redis-RedisCluster.html]

Defaultfalse
createoptionalbool

Determines whether resources will be created (affects all resources)

Defaulttrue
create_clusteroptionalbool

Determines whether an ElastiCache cluster will be created or not

Defaultfalse
create_parameter_groupoptionalbool

Determines whether the ElastiCache parameter group will be created or not

Defaultfalse
create_primary_global_replication_groupoptionalbool

Determines whether an primary ElastiCache global replication group will be created

Defaultfalse
create_replication_groupoptionalbool

Determines whether an ElastiCache replication group will be created or not

Defaulttrue
create_secondary_global_replication_groupoptionalbool

Determines whether an secondary ElastiCache global replication group will be created

Defaultfalse
create_security_groupoptionalbool

Determines if a security group is created

Defaulttrue
create_subnet_groupoptionalbool

Determines whether the Elasticache subnet group will be created or not

Defaulttrue
data_tiering_enabledoptionalbool

Enables data tiering. Data tiering is only supported for replication groups using the `r6gd` node type. This parameter must be set to true when using `r6gd` nodes

Defaultnull
descriptionoptionalstring

User-created description for the replication group

Defaultnull
engineoptionalstring

Name of the cache engine to be used for this cache cluster. Valid values are `memcached`, `redis`, or `valkey`

Defaultredis
engine_versionoptionalstring

Version number of the cache engine to be used. If not set, defaults to the latest version

Defaultnull
final_snapshot_identifieroptionalstring

(Redis only) Name of your final cluster snapshot. If omitted, no final snapshot will be made

Defaultnull
global_replication_group_idoptionalstring

The ID of the global replication group to which this replication group should belong

Defaultnull
global_replication_group_id_suffixoptionalstring

The ID suffix of the global replication group

Defaultnull
ip_discoveryoptionalstring

The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6`

Defaultnull
kms_key_arnoptionalstring

The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. Can be specified only if `at_rest_encryption_enabled = true`

Defaultnull
log_delivery_configurationoptionalany

(Redis OSS or Valkey) Specifies the destination and format of Redis OSS/Valkey SLOWLOG or Redis OSS/Valkey Engine Log

Default{…}
maintenance_windowoptionalstring

Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC)

Defaultnull
multi_az_enabledoptionalbool

Specifies whether to enable Multi-AZ Support for the replication group. If true, `automatic_failover_enabled` must also be enabled. Defaults to `false`

Defaultfalse
network_typeoptionalstring

The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dual_stack`

Defaultnull
node_typeoptionalstring

The instance class used. For Memcached, changing this value will re-create the resource

Defaultnull
notification_topic_arnoptionalstring

ARN of an SNS topic to send ElastiCache notifications to

Defaultnull
num_cache_clustersoptionalnumber

Number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. Conflicts with `num_node_groups`. Defaults to `1`

Defaultnull
num_cache_nodesoptionalnumber

The initial number of cache nodes that the cache cluster will have. For Redis, this value must be 1. For Memcached, this value must be between 1 and 40. If this number is reduced on subsequent runs, the highest numbered nodes will be removed

Default1
num_node_groupsoptionalnumber

Number of node groups (shards) for this Redis replication group. Changing this number will trigger a resizing operation before other settings modifications

Defaultnull
outpost_modeoptionalstring

Specify the outpost mode that will apply to the cache cluster creation. Valid values are `single-outpost` and `cross-outpost`, however AWS currently only supports `single-outpost` mode

Defaultnull
parameter_group_descriptionoptionalstring

The description of the ElastiCache parameter group. Defaults to `Managed by Terraform`

Defaultnull
parameter_group_familyoptionalstring

The family of the ElastiCache parameter group

Default""

All 68 are optional — the module deploys with none of them set. Showing 40, so the site stays a static download — the remaining 28 are in the source.

Outputs

25
cloudwatch_log_group_arn

Arn of cloudwatch log group created

cloudwatch_log_group_name

Name of cloudwatch log group created

cloudwatch_log_groups

Map of CloudWatch log groups created and their attributes

cluster_address

(Memcached only) DNS name of the cache cluster without the port appended

cluster_arn

The ARN of the ElastiCache Cluster

cluster_cache_nodes

List of node objects including `id`, `address`, `port` and `availability_zone`

cluster_configuration_endpoint

(Memcached only) Configuration endpoint to allow host discovery

cluster_engine_version_actual

Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine

global_replication_group_arn

ARN of the created ElastiCache Global Replication Group

global_replication_group_engine_version_actual

The full version number of the cache engine running on the members of this global replication group

global_replication_group_id

ID of the ElastiCache Global Replication Group

global_replication_group_node_groups

Set of node groups (shards) on the global replication group

parameter_group_arn

The AWS ARN associated with the parameter group

parameter_group_id

The ElastiCache parameter group name

replication_group_arn

ARN of the created ElastiCache Replication Group

replication_group_configuration_endpoint_address

Address of the replication group configuration endpoint when cluster mode is enabled

replication_group_engine_version_actual

Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine

replication_group_id

ID of the ElastiCache Replication Group

replication_group_member_clusters

Identifiers of all the nodes that are part of this replication group

replication_group_port

Port of the primary node in the replication group, if the cluster mode is disabled

replication_group_primary_endpoint_address

Address of the endpoint for the primary node in the replication group, if the cluster mode is disabled

replication_group_reader_endpoint_address

Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled

security_group_arn

Amazon Resource Name (ARN) of the security group

security_group_id

ID of the security group

subnet_group_name

The ElastiCache subnet group name

What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.