From 4325c5b7c9c5b50b1a87066205aec896056a06e4 Mon Sep 17 00:00:00 2001 From: Phillip Shipley Date: Fri, 25 Jan 2019 09:57:26 -0500 Subject: [PATCH 01/16] add var to disable creating dns entry initially --- main.tf | 1 + vars.tf | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/main.tf b/main.tf index 2d8f16d..afee338 100644 --- a/main.tf +++ b/main.tf @@ -140,6 +140,7 @@ module "ecs" { * Create Cloudflare DNS record */ resource "cloudflare_record" "dns" { + count = "${var.create_dns_entry}" domain = "${var.cloudflare_domain}" name = "${var.subdomain}" value = "${data.terraform_remote_state.common.alb_dns_name}" diff --git a/vars.tf b/vars.tf index 94085c7..335c7f3 100644 --- a/vars.tf +++ b/vars.tf @@ -28,6 +28,11 @@ variable "cpu" { default = "128" } +variable "create_dns_entry" { + description = "Set to 1 to create Cloudflare entry, 0 to not create entry" + default = 1 +} + variable "desired_count" { default = 2 } From 99118ad380a731cb72ccd96d0bd22a21dc0fbfc3 Mon Sep 17 00:00:00 2001 From: Phillip Shipley Date: Fri, 25 Jan 2019 11:10:30 -0500 Subject: [PATCH 02/16] add depends statement to try to fix module access issue --- main.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.tf b/main.tf index afee338..dfae5c8 100644 --- a/main.tf +++ b/main.tf @@ -118,6 +118,8 @@ data "template_file" "task_def_web" { show_saml_errors = "${var.show_saml_errors}" subdomain = "${var.subdomain}" } + + depends_on = ["module.memcache"] } /* From c5125911e421e37a63533373e7bab832d6cff2ff Mon Sep 17 00:00:00 2001 From: Phillip Shipley Date: Fri, 25 Jan 2019 11:16:50 -0500 Subject: [PATCH 03/16] add varible to disable creating ecs service intially until memcache is finished --- main.tf | 2 ++ vars.tf | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/main.tf b/main.tf index dfae5c8..82917b9 100644 --- a/main.tf +++ b/main.tf @@ -99,6 +99,7 @@ resource "random_id" "ssp_secret_salt" { */ data "template_file" "task_def_web" { template = "${file("${path.module}/task-def-web.json")}" + count = "${var.create_ecs_service}" vars { admin_email = "${var.admin_email}" @@ -126,6 +127,7 @@ data "template_file" "task_def_web" { * Create new ecs service */ module "ecs" { + count = "${var.create_ecs_service}" source = "github.com/silinternational/terraform-modules//aws/ecs/service-only?ref=2.2.0" cluster_id = "${data.terraform_remote_state.common.ecs_cluster_id}" service_name = "${var.app_name}" diff --git a/vars.tf b/vars.tf index 335c7f3..390fa62 100644 --- a/vars.tf +++ b/vars.tf @@ -33,6 +33,11 @@ variable "create_dns_entry" { default = 1 } +variable "create_ecs_service" { + description = "Set to 1 to create ECS Service, 0 to not create service" + default = 1 +} + variable "desired_count" { default = 2 } From e0008ee4e748a3949762333021285258554f1b15 Mon Sep 17 00:00:00 2001 From: Phillip Shipley Date: Fri, 25 Jan 2019 11:23:25 -0500 Subject: [PATCH 04/16] try another option for memcache outputs --- main.tf | 6 ++---- vars.tf | 5 ----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/main.tf b/main.tf index 82917b9..f072820 100644 --- a/main.tf +++ b/main.tf @@ -99,7 +99,6 @@ resource "random_id" "ssp_secret_salt" { */ data "template_file" "task_def_web" { template = "${file("${path.module}/task-def-web.json")}" - count = "${var.create_ecs_service}" vars { admin_email = "${var.admin_email}" @@ -112,8 +111,8 @@ data "template_file" "task_def_web" { idp_display_name = "${var.idp_display_name}" idp_name = "${var.idp_name}" logentries_key = "${logentries_log.log.token}" - memcache_host1 = "${module.memcache.cache_nodes.0.address}" - memcache_host2 = "${module.memcache.cache_nodes.1.address}" + memcache_host1 = "${length(module.memcache.cache_nodes) > 0 ? element(module.memcache.cache_nodes.*.address, 0) : ""}" + memcache_host2 = "${length(module.memcache.cache_nodes) > 1 ? element(module.memcache.cache_nodes.*.address, 1) : ""}" memory = "${var.memory}" secret_salt = "${random_id.ssp_secret_salt.hex}" show_saml_errors = "${var.show_saml_errors}" @@ -127,7 +126,6 @@ data "template_file" "task_def_web" { * Create new ecs service */ module "ecs" { - count = "${var.create_ecs_service}" source = "github.com/silinternational/terraform-modules//aws/ecs/service-only?ref=2.2.0" cluster_id = "${data.terraform_remote_state.common.ecs_cluster_id}" service_name = "${var.app_name}" diff --git a/vars.tf b/vars.tf index 390fa62..335c7f3 100644 --- a/vars.tf +++ b/vars.tf @@ -33,11 +33,6 @@ variable "create_dns_entry" { default = 1 } -variable "create_ecs_service" { - description = "Set to 1 to create ECS Service, 0 to not create service" - default = 1 -} - variable "desired_count" { default = 2 } From 5c39c16832cd8eef05e6ade7d3423cb0e395cf70 Mon Sep 17 00:00:00 2001 From: Phillip Shipley Date: Fri, 25 Jan 2019 11:32:51 -0500 Subject: [PATCH 05/16] change from using memcache module to inline due to dependency issue --- main.tf | 38 ++++++++++++++++++++++++++------------ vars.tf | 24 ++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 12 deletions(-) diff --git a/main.tf b/main.tf index f072820..07ce507 100644 --- a/main.tf +++ b/main.tf @@ -70,17 +70,31 @@ module "ecs-service-cloudwatch-dashboard" { } /* - * Create Memcache cluster for session handling + * Create Elasticache subnet group */ -module "memcache" { - source = "github.com/silinternational/terraform-modules//aws/elasticache/memcache?ref=2.2.0" - cluster_id = "${var.app_name}-${data.terraform_remote_state.common.app_env}" - security_group_ids = ["${data.terraform_remote_state.common.vpc_default_sg_id}"] - subnet_group_name = "${var.app_name}-${data.terraform_remote_state.common.app_env}" - subnet_ids = ["${data.terraform_remote_state.common.private_subnet_ids}"] - availability_zones = ["${data.terraform_remote_state.common.aws_zones}"] - app_name = "${var.app_name}" - app_env = "${data.terraform_remote_state.common.app_env}" +resource "aws_elasticache_subnet_group" "memcache_subnet_group" { + name = "${var.app_name}-${data.terraform_remote_state.common.app_env}" + subnet_ids = ["${data.terraform_remote_state.common.private_subnet_ids}"] +} + +/* + * Create Cluster + */ +resource "aws_elasticache_cluster" "memcache" { + cluster_id = "${replace("${var.cluster_id}", "/(.{0,20})(.*)/", "$1")}" + engine = "memcached" + node_type = "${var.memcache_node_type}" + port = "${var.memcache_port}" + num_cache_nodes = "${var.memcache_num_cache_nodes}" + parameter_group_name = "${var.memcache_parameter_group_name}" + security_group_ids = ["${data.terraform_remote_state.common.vpc_default_sg_id}"] + subnet_group_name = "${aws_elasticache_subnet_group.memcache_subnet_group.name}" + az_mode = "${var.memcache_az_mode}" + + tags { + "app_name" = "${var.app_name}" + "app_env" = "${data.terraform_remote_state.common.app_env}" + } } /* @@ -111,8 +125,8 @@ data "template_file" "task_def_web" { idp_display_name = "${var.idp_display_name}" idp_name = "${var.idp_name}" logentries_key = "${logentries_log.log.token}" - memcache_host1 = "${length(module.memcache.cache_nodes) > 0 ? element(module.memcache.cache_nodes.*.address, 0) : ""}" - memcache_host2 = "${length(module.memcache.cache_nodes) > 1 ? element(module.memcache.cache_nodes.*.address, 1) : ""}" + memcache_host1 = "${aws_elasticache_cluster.memcache.cache_nodes.0.address}" + memcache_host2 = "${aws_elasticache_cluster.memcache.cache_nodes.1.address}" memory = "${var.memory}" secret_salt = "${random_id.ssp_secret_salt.hex}" show_saml_errors = "${var.show_saml_errors}" diff --git a/vars.tf b/vars.tf index 335c7f3..a0d5bd9 100644 --- a/vars.tf +++ b/vars.tf @@ -45,6 +45,30 @@ variable "idp_display_name" {} variable "idp_name" {} variable "logentries_account_key" {} +variable "memcache_az_mode" { + type = "string" + default = "cross-az" +} + +variable "memcache_node_type" { + default = "cache.t2.micro" +} + +variable "memcache_num_cache_nodes" { + type = "string" + default = 2 +} + +variable "memcache_parameter_group_name" { + type = "string" + default = "default.memcached1.4" +} + +variable "memcache_port" { + type = "string" + default = "11211" +} + variable "memory" { default = "128" } From 9825ae09890ff80442f7fe6d8696aa8ca95cfcd7 Mon Sep 17 00:00:00 2001 From: Phillip Shipley Date: Fri, 25 Jan 2019 11:34:24 -0500 Subject: [PATCH 06/16] fix invalid variable --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 07ce507..7cef0ed 100644 --- a/main.tf +++ b/main.tf @@ -81,7 +81,7 @@ resource "aws_elasticache_subnet_group" "memcache_subnet_group" { * Create Cluster */ resource "aws_elasticache_cluster" "memcache" { - cluster_id = "${replace("${var.cluster_id}", "/(.{0,20})(.*)/", "$1")}" + cluster_id = "${var.app_name}-${data.terraform_remote_state.common.app_env}" engine = "memcached" node_type = "${var.memcache_node_type}" port = "${var.memcache_port}" From c90962f4102bf76abb860f0f1b55165d2c5f7c1a Mon Sep 17 00:00:00 2001 From: Phillip Shipley Date: Fri, 25 Jan 2019 11:36:31 -0500 Subject: [PATCH 07/16] remove no longer valid depends on statement --- main.tf | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main.tf b/main.tf index 7cef0ed..42a1055 100644 --- a/main.tf +++ b/main.tf @@ -111,8 +111,8 @@ resource "random_id" "ssp_secret_salt" { /* * Create task definition template */ -data "template_file" "task_def_web" { - template = "${file("${path.module}/task-def-web.json")}" +data "template_file" "task_def_hub" { + template = "${file("${path.module}/task-def-hub.json")}" vars { admin_email = "${var.admin_email}" @@ -132,8 +132,6 @@ data "template_file" "task_def_web" { show_saml_errors = "${var.show_saml_errors}" subdomain = "${var.subdomain}" } - - depends_on = ["module.memcache"] } /* @@ -144,7 +142,7 @@ module "ecs" { cluster_id = "${data.terraform_remote_state.common.ecs_cluster_id}" service_name = "${var.app_name}" service_env = "${data.terraform_remote_state.common.app_env}" - container_def_json = "${data.template_file.task_def_web.rendered}" + container_def_json = "${data.template_file.task_def_hub.rendered}" desired_count = "${var.desired_count}" tg_arn = "${aws_alb_target_group.tg.arn}" lb_container_name = "hub" From b83d4d72b3959ed7ae795a93acdfd27719b5084f Mon Sep 17 00:00:00 2001 From: Phillip Shipley Date: Fri, 25 Jan 2019 11:40:40 -0500 Subject: [PATCH 08/16] update memcache parameter group name --- vars.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars.tf b/vars.tf index a0d5bd9..6f35471 100644 --- a/vars.tf +++ b/vars.tf @@ -61,7 +61,7 @@ variable "memcache_num_cache_nodes" { variable "memcache_parameter_group_name" { type = "string" - default = "default.memcached1.4" + default = "default.memcached1.5" } variable "memcache_port" { From 0cd2f280528962a9afa229a1b5f3dcdba9fd9b84 Mon Sep 17 00:00:00 2001 From: Phillip Shipley Date: Fri, 25 Jan 2019 11:46:09 -0500 Subject: [PATCH 09/16] add missing variable --- main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/main.tf b/main.tf index 42a1055..9e2c6f5 100644 --- a/main.tf +++ b/main.tf @@ -118,6 +118,7 @@ data "template_file" "task_def_hub" { admin_email = "${var.admin_email}" admin_name = "${var.admin_name}" admin_pass = "${random_id.ssp_admin_pass.hex}" + analytics_id = "${var.analytics_id}" cloudflare_domain = "${var.cloudflare_domain}" cpu = "${var.cpu}" docker_image = "${module.ecr.repo_url}" From 3380cbe024f984e5270e646f0cc4e0b68938ba92 Mon Sep 17 00:00:00 2001 From: Phillip Shipley Date: Fri, 25 Jan 2019 11:50:52 -0500 Subject: [PATCH 10/16] add another missing var --- main.tf | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/main.tf b/main.tf index 9e2c6f5..5e770d9 100644 --- a/main.tf +++ b/main.tf @@ -115,23 +115,24 @@ data "template_file" "task_def_hub" { template = "${file("${path.module}/task-def-hub.json")}" vars { - admin_email = "${var.admin_email}" - admin_name = "${var.admin_name}" - admin_pass = "${random_id.ssp_admin_pass.hex}" - analytics_id = "${var.analytics_id}" - cloudflare_domain = "${var.cloudflare_domain}" - cpu = "${var.cpu}" - docker_image = "${module.ecr.repo_url}" - docker_tag = "${var.docker_tag}" - idp_display_name = "${var.idp_display_name}" - idp_name = "${var.idp_name}" - logentries_key = "${logentries_log.log.token}" - memcache_host1 = "${aws_elasticache_cluster.memcache.cache_nodes.0.address}" - memcache_host2 = "${aws_elasticache_cluster.memcache.cache_nodes.1.address}" - memory = "${var.memory}" - secret_salt = "${random_id.ssp_secret_salt.hex}" - show_saml_errors = "${var.show_saml_errors}" - subdomain = "${var.subdomain}" + admin_email = "${var.admin_email}" + admin_name = "${var.admin_name}" + admin_pass = "${random_id.ssp_admin_pass.hex}" + analytics_id = "${var.analytics_id}" + cloudflare_domain = "${var.cloudflare_domain}" + cpu = "${var.cpu}" + docker_image = "${module.ecr.repo_url}" + docker_tag = "${var.docker_tag}" + idp_display_name = "${var.idp_display_name}" + idp_name = "${var.idp_name}" + logentries_key = "${logentries_log.log.token}" + memcache_host1 = "${aws_elasticache_cluster.memcache.cache_nodes.0.address}" + memcache_host2 = "${aws_elasticache_cluster.memcache.cache_nodes.1.address}" + memory = "${var.memory}" + secret_salt = "${random_id.ssp_secret_salt.hex}" + session_store_type = "${var.session_store_type}" + show_saml_errors = "${var.show_saml_errors}" + subdomain = "${var.subdomain}" } } From f1f85adf0af948845ab9de110b474b0a77b343a4 Mon Sep 17 00:00:00 2001 From: Schparky <3172830+Schparky@users.noreply.github.com> Date: Wed, 22 Apr 2020 10:47:29 -0600 Subject: [PATCH 11/16] add cloudwatch logs --- main.tf | 13 +++++++++++++ task-def-hub.json | 11 +++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 5e770d9..65d4f99 100644 --- a/main.tf +++ b/main.tf @@ -18,6 +18,19 @@ resource "logentries_log" "log" { source = "token" } +/* + * Create Cloudwatch log group + */ +resource "aws_cloudwatch_log_group" "logs" { + name = "${var.app_name}-${data.terraform_remote_state.common.app_env}" + retention_in_days = 30 + + tags { + idp_name = "${var.idp_name}" + app_env = "${data.terraform_remote_state.common.app_env}" + } +} + /* * Create target group for ALB */ diff --git a/task-def-hub.json b/task-def-hub.json index aa0d8d1..4e2b5a9 100644 --- a/task-def-hub.json +++ b/task-def-hub.json @@ -1,7 +1,14 @@ [ { "dnsSearchDomains": null, - "logConfiguration": null, + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-group": "${aws_cloudwatch_log_group.logs.name}", + "awslogs-region": "${aws_region}", + "awslogs-stream-prefix": "${app_name}-${data.terraform_remote_state.common.app_env}" + } + }, "entryPoint": null, "portMappings": [ { @@ -100,4 +107,4 @@ "privileged": null, "name": "hub" } -] \ No newline at end of file +] From dea590ce1b3dd2507c94517a678d5d6a27e1bad4 Mon Sep 17 00:00:00 2001 From: Schparky <3172830+Schparky@users.noreply.github.com> Date: Wed, 22 Apr 2020 12:14:27 -0600 Subject: [PATCH 12/16] cloudflare updates --- main.tf | 2 +- providers.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 65d4f99..5a2c0fd 100644 --- a/main.tf +++ b/main.tf @@ -170,7 +170,7 @@ module "ecs" { */ resource "cloudflare_record" "dns" { count = "${var.create_dns_entry}" - domain = "${var.cloudflare_domain}" + zone_id = "${var.cloudflare_domain}" name = "${var.subdomain}" value = "${data.terraform_remote_state.common.alb_dns_name}" type = "CNAME" diff --git a/providers.tf b/providers.tf index 08050e6..33aca56 100644 --- a/providers.tf +++ b/providers.tf @@ -6,7 +6,7 @@ provider "aws" { provider "cloudflare" { email = "${var.cloudflare_email}" - token = "${var.cloudflare_token}" + api_token = "${var.cloudflare_token}" } provider "logentries" { From 0e493a8baf3f54c507fe52ef0054f4bb0fb19f08 Mon Sep 17 00:00:00 2001 From: Schparky <3172830+Schparky@users.noreply.github.com> Date: Wed, 22 Apr 2020 12:21:42 -0600 Subject: [PATCH 13/16] revert to cloudflare provider v1 --- main.tf | 2 +- providers.tf | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 5a2c0fd..65d4f99 100644 --- a/main.tf +++ b/main.tf @@ -170,7 +170,7 @@ module "ecs" { */ resource "cloudflare_record" "dns" { count = "${var.create_dns_entry}" - zone_id = "${var.cloudflare_domain}" + domain = "${var.cloudflare_domain}" name = "${var.subdomain}" value = "${data.terraform_remote_state.common.alb_dns_name}" type = "CNAME" diff --git a/providers.tf b/providers.tf index 33aca56..67a2b8d 100644 --- a/providers.tf +++ b/providers.tf @@ -5,8 +5,9 @@ provider "aws" { } provider "cloudflare" { + version = "~> 1.0" email = "${var.cloudflare_email}" - api_token = "${var.cloudflare_token}" + token = "${var.cloudflare_token}" } provider "logentries" { From c4d9f3305b63e7a4fd96d13263f9357a6fc6aa64 Mon Sep 17 00:00:00 2001 From: Schparky <3172830+Schparky@users.noreply.github.com> Date: Wed, 22 Apr 2020 12:31:46 -0600 Subject: [PATCH 14/16] properly render cloudwatch log group name --- main.tf | 37 +++++++++++++++++++------------------ task-def-hub.json | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/main.tf b/main.tf index 65d4f99..550592c 100644 --- a/main.tf +++ b/main.tf @@ -128,24 +128,25 @@ data "template_file" "task_def_hub" { template = "${file("${path.module}/task-def-hub.json")}" vars { - admin_email = "${var.admin_email}" - admin_name = "${var.admin_name}" - admin_pass = "${random_id.ssp_admin_pass.hex}" - analytics_id = "${var.analytics_id}" - cloudflare_domain = "${var.cloudflare_domain}" - cpu = "${var.cpu}" - docker_image = "${module.ecr.repo_url}" - docker_tag = "${var.docker_tag}" - idp_display_name = "${var.idp_display_name}" - idp_name = "${var.idp_name}" - logentries_key = "${logentries_log.log.token}" - memcache_host1 = "${aws_elasticache_cluster.memcache.cache_nodes.0.address}" - memcache_host2 = "${aws_elasticache_cluster.memcache.cache_nodes.1.address}" - memory = "${var.memory}" - secret_salt = "${random_id.ssp_secret_salt.hex}" - session_store_type = "${var.session_store_type}" - show_saml_errors = "${var.show_saml_errors}" - subdomain = "${var.subdomain}" + admin_email = "${var.admin_email}" + admin_name = "${var.admin_name}" + admin_pass = "${random_id.ssp_admin_pass.hex}" + analytics_id = "${var.analytics_id}" + cloudwatch_log_group_name = "${aws_cloudwatch_log_group.logs.name}" + cloudflare_domain = "${var.cloudflare_domain}" + cpu = "${var.cpu}" + docker_image = "${module.ecr.repo_url}" + docker_tag = "${var.docker_tag}" + idp_display_name = "${var.idp_display_name}" + idp_name = "${var.idp_name}" + logentries_key = "${logentries_log.log.token}" + memcache_host1 = "${aws_elasticache_cluster.memcache.cache_nodes.0.address}" + memcache_host2 = "${aws_elasticache_cluster.memcache.cache_nodes.1.address}" + memory = "${var.memory}" + secret_salt = "${random_id.ssp_secret_salt.hex}" + session_store_type = "${var.session_store_type}" + show_saml_errors = "${var.show_saml_errors}" + subdomain = "${var.subdomain}" } } diff --git a/task-def-hub.json b/task-def-hub.json index 4e2b5a9..9ef3cf8 100644 --- a/task-def-hub.json +++ b/task-def-hub.json @@ -4,7 +4,7 @@ "logConfiguration": { "logDriver": "awslogs", "options": { - "awslogs-group": "${aws_cloudwatch_log_group.logs.name}", + "awslogs-group": "${cloudwatch_log_group_name}", "awslogs-region": "${aws_region}", "awslogs-stream-prefix": "${app_name}-${data.terraform_remote_state.common.app_env}" } From 93a3215ee1f1707ca573b21bd4468275cdc690bb Mon Sep 17 00:00:00 2001 From: Schparky <3172830+Schparky@users.noreply.github.com> Date: Wed, 22 Apr 2020 12:35:06 -0600 Subject: [PATCH 15/16] more substitutions in template --- main.tf | 3 +++ task-def-hub.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 550592c..dfc1839 100644 --- a/main.tf +++ b/main.tf @@ -132,6 +132,9 @@ data "template_file" "task_def_hub" { admin_name = "${var.admin_name}" admin_pass = "${random_id.ssp_admin_pass.hex}" analytics_id = "${var.analytics_id}" + app_env = "${data.terraform_remote_state.common.app_env}" + app_name = "${var.app_name}" + aws_region = "${var.aws_region}" cloudwatch_log_group_name = "${aws_cloudwatch_log_group.logs.name}" cloudflare_domain = "${var.cloudflare_domain}" cpu = "${var.cpu}" diff --git a/task-def-hub.json b/task-def-hub.json index 9ef3cf8..893e060 100644 --- a/task-def-hub.json +++ b/task-def-hub.json @@ -6,7 +6,7 @@ "options": { "awslogs-group": "${cloudwatch_log_group_name}", "awslogs-region": "${aws_region}", - "awslogs-stream-prefix": "${app_name}-${data.terraform_remote_state.common.app_env}" + "awslogs-stream-prefix": "${app_name}-${app_env}" } }, "entryPoint": null, From 518b40fc6f63d17c0e8d54471b3be59a2fc4b26c Mon Sep 17 00:00:00 2001 From: Schparky <3172830+Schparky@users.noreply.github.com> Date: Fri, 1 May 2020 14:56:49 -0600 Subject: [PATCH 16/16] remove logentries log --- main.tf | 10 ---------- task-def-hub.json | 4 ---- 2 files changed, 14 deletions(-) diff --git a/main.tf b/main.tf index dfc1839..46dd1d0 100644 --- a/main.tf +++ b/main.tf @@ -9,15 +9,6 @@ module "ecr" { cd_user_arn = "${data.terraform_remote_state.common.codeship_arn}" } -/* - * Create Logentries log - */ -resource "logentries_log" "log" { - logset_id = "${data.terraform_remote_state.common.logentries_set_id}" - name = "${var.app_name}" - source = "token" -} - /* * Create Cloudwatch log group */ @@ -142,7 +133,6 @@ data "template_file" "task_def_hub" { docker_tag = "${var.docker_tag}" idp_display_name = "${var.idp_display_name}" idp_name = "${var.idp_name}" - logentries_key = "${logentries_log.log.token}" memcache_host1 = "${aws_elasticache_cluster.memcache.cache_nodes.0.address}" memcache_host2 = "${aws_elasticache_cluster.memcache.cache_nodes.1.address}" memory = "${var.memory}" diff --git a/task-def-hub.json b/task-def-hub.json index 893e060..db42f17 100644 --- a/task-def-hub.json +++ b/task-def-hub.json @@ -57,10 +57,6 @@ "name": "IDP_NAME", "value": "${idp_name}" }, - { - "name": "LOGENTRIES_KEY", - "value": "${logentries_key}" - }, { "name": "MEMCACHE_HOST1", "value": "${memcache_host1}"