A Terraform module for creating an ElastiCache Redis cluster of between 1 and 9 nodes. Generally works without any modification,
but has some restrictions. Creates CloudWatch metrics for each node individually.
Noteworthy Restrictions
-----------------------
1. If using a `cache_clusters` count of 1, snapshots are not available via this module. We assume that a 1 node is dev/staging.
2. The T1/T2 families of instances are only available when using a `cache_cluster` count of 1 (default). We disable failover and snapshots for 1 node, as we assume that is dev/staging.
3. We assume that you will select a production-grade instance type for any `cache_cluster` count between 2-9. Using T1/T2 instances with a count of between 2-9 will cause an error. We enable failover and snapshots for clusters of this size and assume production.
4. At this moment, replication groups of more than 9 nodes are not available without user modification of the module.
Input Variables (TBC)
---------------------
-`vpc_id` - Typically ${module.vpc.vpc_id}. *Required*.
-`security_groups` - Typically ["${module.bastion.security_group}"], and any other security groups required. *Required*.
-`subnet_ids` - Subnet ID(s) that the cluster should have instances created within. *Required*.
-`cache_name` - Name of the cluster(s) replciation group. Filters down to instances. *Required*.
-`cache_clusters` - Number of cache clusters within the replication group. Defaults to "1". Optional. _Please refer to the restrictions above_.
-`automatic_failover_enabled` - Whether automatic failover happens in the event of a primary node failure. Defaults to "false". Optional.
-`engine_version` - Redis engine version number. Defaults to "2.8.24". Optional.
-`parameter_group_name` - Redis parameter group name. Defaults to "default.redis2.8". Optional.
-`instance_type` - Instance type for all nodes within the replication group. Defaults to "t2.micro". Optional. _Please refer to the restrictions above_.
-`port` - Redis port. Defaults to "6379". Optional.
-`snapshot_window` - Desired daily cluster snapshot window. Defaults to "03:00-04:00". Optional. _Please refer to the restrictions above_.
-`snapshot_retention_limit` - Number of snapshots to keep. Defaults to "1". Optional. _Please refer to the restrictions above_.
-`dns_zone` - Route53 zone ID. Works best with a module. *Required*.
Outputs
-------
None.
Usage
-----
You can use this module in your Terraform template with the following steps. Most variables have defaults set, so setting variables is optional in most cases.
1.) Adding a module resource to your template, e.g. `main.tf`