1+ variable "REDIS_NAME" {
2+ type = " string"
3+ default = " redis"
4+ description = " Redis name"
5+ }
6+
17variable "REDIS_INSTANCE_TYPE" {
28 type = " string"
39 default = " cache.t2.medium"
@@ -16,19 +22,38 @@ variable "REDIS_CLUSTER_ENABLED" {
1622 description = " Set to false to prevent the module from creating any resources"
1723}
1824
25+ variable "REDIS_AUTH_TOKEN" {
26+ type = " string"
27+ default = " "
28+ description = " Auth token for password protecting redis, transit_encryption_enabled must be set to 'true'! Password must be longer than 16 chars"
29+ }
30+
31+ variable "REDIS_TRANSIT_ENCRYPTION_ENABLED" {
32+ type = " string"
33+ default = " true"
34+ description = " Enable TLS"
35+ }
36+
37+ variable "REDIS_PARAMS" {
38+ type = " list"
39+ default = []
40+ description = " A list of Redis parameters to apply. Note that parameters may differ from a Redis family to another"
41+ }
42+
1943module "elasticache_redis" {
20- source = " git::https://github.com/cloudposse/terraform-aws-elasticache-redis.git?ref=tags/0.4.3 "
44+ source = " git::https://github.com/cloudposse/terraform-aws-elasticache-redis.git?ref=tags/0.7.1 "
2145 namespace = " ${ var . namespace } "
2246 stage = " ${ var . stage } "
23- name = " redis "
47+ name = " ${ var . REDIS_NAME } "
2448 zone_id = " ${ var . zone_id } "
2549 security_groups = [" ${ module . kops_metadata . nodes_security_group_id } " ]
2650 vpc_id = " ${ module . vpc . vpc_id } "
2751 subnets = [" ${ module . subnets . private_subnet_ids } " ]
2852 maintenance_window = " sun:03:00-sun:04:00"
2953 cluster_size = " ${ var . REDIS_CLUSTER_SIZE } "
3054 instance_type = " ${ var . REDIS_INSTANCE_TYPE } "
31- engine_version = " 3.2.4"
55+ transit_encryption_enabled = " ${ var . REDIS_TRANSIT_ENCRYPTION_ENABLED } "
56+ engine_version = " 3.2.6"
3257 family = " redis3.2"
3358 port = " 6379"
3459 alarm_cpu_threshold_percent = " 75"
@@ -37,6 +62,9 @@ module "elasticache_redis" {
3762 availability_zones = [" ${ data . aws_availability_zones . available . names } " ]
3863 automatic_failover = " false"
3964 enabled = " ${ var . REDIS_CLUSTER_ENABLED } "
65+ auth_token = " ${ var . REDIS_AUTH_TOKEN } "
66+
67+ parameter = " ${ var . REDIS_PARAMS } "
4068}
4169
4270output "elasticache_redis_id" {
0 commit comments