Skip to content

Commit

Permalink
add log level to datadog (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrenarciso4 authored Jun 14, 2024
1 parent 34e62ff commit f5ac9cc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
13 changes: 7 additions & 6 deletions terraform/datadog.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ resource "aws_ecs_task_definition" "datadog" {
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
container_definitions = templatefile("${path.module}/templates/datadog-agent.json.tpl", {
AWS_REGION = data.aws_region.current.name
DD_API_KEY = var.datadog_api_key
DD_APM_ENV = var.datadog_env
STATS_URL = var.datadog_stats_url
IMAGE = var.datadog_image
VERSION = var.datadog_image_version
AWS_REGION = data.aws_region.current.name
DD_API_KEY = var.datadog_api_key
DD_APM_ENV = var.datadog_env
STATS_URL = var.datadog_stats_url
IMAGE = var.datadog_image
VERSION = var.datadog_image_version
DD_LOG_LEVEL = var.datadog_log_level
})
}

Expand Down
4 changes: 4 additions & 0 deletions terraform/templates/datadog-agent.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
{
"name": "DD_APM_ENV",
"value": "${DD_APM_ENV}"
},
{
"name": "DD_LOG_LEVEL",
"value": "${DD_LOG_LEVEL}"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ variable "datadog_image_version" {
description = "datadog agent image version"
default = "latest"
}
variable "datadog_log_level" {
description = "datadog log level"
default = "INFO"
}
variable "datadog_count" {
description = "datadog service count"
default = "2"
Expand Down

0 comments on commit f5ac9cc

Please sign in to comment.