From ad771d9503a60333a0d75db5dbb7f5fbaa1c02ac Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Sun, 21 Oct 2018 00:56:03 +0600 Subject: [PATCH] [aws/backing-services] update module versions (#44) * Update elastic cache --- aws/backing-services/elasticache-redis.tf | 34 +++++++++++++++++++++-- aws/backing-services/elasticsearch.tf | 2 +- aws/ecr/kops_ecr_app.tf | 2 +- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/aws/backing-services/elasticache-redis.tf b/aws/backing-services/elasticache-redis.tf index eed3f15b3..31922334a 100644 --- a/aws/backing-services/elasticache-redis.tf +++ b/aws/backing-services/elasticache-redis.tf @@ -1,3 +1,9 @@ +variable "REDIS_NAME" { + type = "string" + default = "redis" + description = "Redis name" +} + variable "REDIS_INSTANCE_TYPE" { type = "string" default = "cache.t2.medium" @@ -16,11 +22,29 @@ variable "REDIS_CLUSTER_ENABLED" { description = "Set to false to prevent the module from creating any resources" } +variable "REDIS_AUTH_TOKEN" { + type = "string" + default = "" + description = "Auth token for password protecting redis, transit_encryption_enabled must be set to 'true'! Password must be longer than 16 chars" +} + +variable "REDIS_TRANSIT_ENCRYPTION_ENABLED" { + type = "string" + default = "true" + description = "Enable TLS" +} + +variable "REDIS_PARAMS" { + type = "list" + default = [] + description = "A list of Redis parameters to apply. Note that parameters may differ from a Redis family to another" +} + module "elasticache_redis" { - source = "git::https://github.com/cloudposse/terraform-aws-elasticache-redis.git?ref=tags/0.4.3" + source = "git::https://github.com/cloudposse/terraform-aws-elasticache-redis.git?ref=tags/0.7.1" namespace = "${var.namespace}" stage = "${var.stage}" - name = "redis" + name = "${var.REDIS_NAME}" zone_id = "${var.zone_id}" security_groups = ["${module.kops_metadata.nodes_security_group_id}"] vpc_id = "${module.vpc.vpc_id}" @@ -28,7 +52,8 @@ module "elasticache_redis" { maintenance_window = "sun:03:00-sun:04:00" cluster_size = "${var.REDIS_CLUSTER_SIZE}" instance_type = "${var.REDIS_INSTANCE_TYPE}" - engine_version = "3.2.4" + transit_encryption_enabled = "${var.REDIS_TRANSIT_ENCRYPTION_ENABLED}" + engine_version = "3.2.6" family = "redis3.2" port = "6379" alarm_cpu_threshold_percent = "75" @@ -37,6 +62,9 @@ module "elasticache_redis" { availability_zones = ["${data.aws_availability_zones.available.names}"] automatic_failover = "false" enabled = "${var.REDIS_CLUSTER_ENABLED}" + auth_token = "${var.REDIS_AUTH_TOKEN}" + + parameter = "${var.REDIS_PARAMS}" } output "elasticache_redis_id" { diff --git a/aws/backing-services/elasticsearch.tf b/aws/backing-services/elasticsearch.tf index 7350c1cdc..580546d20 100644 --- a/aws/backing-services/elasticsearch.tf +++ b/aws/backing-services/elasticsearch.tf @@ -63,7 +63,7 @@ locals { } module "elasticsearch" { - source = "git::https://github.com/cloudposse/terraform-aws-elasticsearch.git?ref=tags/0.1.3" + source = "git::https://github.com/cloudposse/terraform-aws-elasticsearch.git?ref=tags/0.1.5" namespace = "${var.namespace}" stage = "${var.stage}" name = "${var.ELASTICSEARCH_NAME}" diff --git a/aws/ecr/kops_ecr_app.tf b/aws/ecr/kops_ecr_app.tf index 0d80cfb96..6ee4207c9 100644 --- a/aws/ecr/kops_ecr_app.tf +++ b/aws/ecr/kops_ecr_app.tf @@ -3,7 +3,7 @@ variable "kops_ecr_app_repository_name" { } module "kops_ecr_app" { - source = "git::https://github.com/cloudposse/terraform-aws-kops-ecr.git?ref=tags/0.1.3" + source = "git::https://github.com/cloudposse/terraform-aws-kops-ecr.git?ref=tags/0.1.4" namespace = "${var.namespace}" stage = "${var.stage}" name = "${var.kops_ecr_app_repository_name}"