From 08f4fa1605b0d7d141546cb904b655fbe0b06ff2 Mon Sep 17 00:00:00 2001 From: Joseph Ligier Date: Tue, 2 Apr 2019 14:58:17 +0200 Subject: [PATCH 1/5] Add desired_count variable --- ecs_datadog.tf | 1 + variables.tf | 1 + 2 files changed, 2 insertions(+) diff --git a/ecs_datadog.tf b/ecs_datadog.tf index 99ff103..87d2a0e 100644 --- a/ecs_datadog.tf +++ b/ecs_datadog.tf @@ -55,6 +55,7 @@ resource "aws_ecs_service" "datadog" { name = "${var.env}-${var.identifier}-datadog-ecs-service" cluster = "${var.ecs-cluster-id}" task_definition = "${aws_ecs_task_definition.datadog.arn}" + desired_count = "${var.count}" # This allows running once for every instance scheduling_strategy = "DAEMON" diff --git a/variables.tf b/variables.tf index 124b9af..813eb38 100644 --- a/variables.tf +++ b/variables.tf @@ -3,3 +3,4 @@ variable "identifier" {} variable "datadog-api-key" {} variable "datadog-extra-config" {} variable "ecs-cluster-id" {} +variable "count" {} From 9d8b7c9ff0dc9d6a5ac6495f4ff30852f9dfb2dc Mon Sep 17 00:00:00 2001 From: Joseph Ligier Date: Tue, 2 Apr 2019 15:06:25 +0200 Subject: [PATCH 2/5] Change count into desired_count --- ecs_datadog.tf | 2 +- variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ecs_datadog.tf b/ecs_datadog.tf index 87d2a0e..f6cf234 100644 --- a/ecs_datadog.tf +++ b/ecs_datadog.tf @@ -55,7 +55,7 @@ resource "aws_ecs_service" "datadog" { name = "${var.env}-${var.identifier}-datadog-ecs-service" cluster = "${var.ecs-cluster-id}" task_definition = "${aws_ecs_task_definition.datadog.arn}" - desired_count = "${var.count}" + desired_count = "${var.desired_count}" # This allows running once for every instance scheduling_strategy = "DAEMON" diff --git a/variables.tf b/variables.tf index 813eb38..84a484f 100644 --- a/variables.tf +++ b/variables.tf @@ -3,4 +3,4 @@ variable "identifier" {} variable "datadog-api-key" {} variable "datadog-extra-config" {} variable "ecs-cluster-id" {} -variable "count" {} +variable "desired_count" {} From 222d1816f118ed970acefde96188e40f41e2589f Mon Sep 17 00:00:00 2001 From: Joseph Ligier Date: Tue, 2 Apr 2019 16:58:21 +0200 Subject: [PATCH 3/5] Change host path of cgroups --- ecs_datadog.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecs_datadog.tf b/ecs_datadog.tf index f6cf234..e49be7c 100644 --- a/ecs_datadog.tf +++ b/ecs_datadog.tf @@ -47,7 +47,7 @@ EOF volume { name = "cgroup" - host_path = "/cgroup/" + host_path = "/sys/fs/cgroup/" } } From 6827bac08383f76a0e992774c504fb96518946ee Mon Sep 17 00:00:00 2001 From: Joseph Ligier Date: Tue, 2 Apr 2019 17:02:09 +0200 Subject: [PATCH 4/5] Remove desired_count --- ecs_datadog.tf | 1 - variables.tf | 1 - 2 files changed, 2 deletions(-) diff --git a/ecs_datadog.tf b/ecs_datadog.tf index e49be7c..75ae135 100644 --- a/ecs_datadog.tf +++ b/ecs_datadog.tf @@ -55,7 +55,6 @@ resource "aws_ecs_service" "datadog" { name = "${var.env}-${var.identifier}-datadog-ecs-service" cluster = "${var.ecs-cluster-id}" task_definition = "${aws_ecs_task_definition.datadog.arn}" - desired_count = "${var.desired_count}" # This allows running once for every instance scheduling_strategy = "DAEMON" diff --git a/variables.tf b/variables.tf index 84a484f..124b9af 100644 --- a/variables.tf +++ b/variables.tf @@ -3,4 +3,3 @@ variable "identifier" {} variable "datadog-api-key" {} variable "datadog-extra-config" {} variable "ecs-cluster-id" {} -variable "desired_count" {} From da36864026a9fa1848e9b931464cae4443af0e85 Mon Sep 17 00:00:00 2001 From: mariambenmoussa Date: Thu, 16 Jan 2020 14:44:24 +0100 Subject: [PATCH 5/5] enable datadog apm --- ecs_datadog.tf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ecs_datadog.tf b/ecs_datadog.tf index 75ae135..3a6e0e8 100644 --- a/ecs_datadog.tf +++ b/ecs_datadog.tf @@ -12,7 +12,12 @@ resource "aws_ecs_task_definition" "datadog" { "environment": [{ "name" : "DD_API_KEY", "value" : "${var.datadog-api-key}" - }], + } + { + "name" : "DD_APM_ENABLED", + "value" : "${var.datadog-apm}" + } + ], "command": [ "bash", "-c",