Skip to content

Commit

Permalink
bugfix ECS Service to use Datadog-Configuration Component #1135 (#1138
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Benbentwo authored Oct 3, 2024
1 parent abc493d commit 6313fe7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions modules/ecs-service/datadog-agent.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ locals {
logDriver = "awsfirelens"
options = var.datadog_agent_sidecar_enabled ? {
Name = "datadog",
apikey = one(module.datadog_configuration[*].datadog_app_key),
Host = format("http-intake.logs.%s", one(module.datadog_configuration[*].datadog_site))
apikey = module.datadog_configuration.datadog_api_key,
Host = format("http-intake.logs.%s", module.datadog_configuration.datadog_site)
dd_service = module.this.name,
dd_tags = local.all_dd_tags,
dd_source = "ecs",
Expand Down Expand Up @@ -87,8 +87,8 @@ module "datadog_container_definition" {
essential = true
map_environment = {
"ECS_FARGATE" = var.task.launch_type == "FARGATE" ? true : false
"DD_API_KEY" = one(module.datadog_configuration[*].datadog_api_key)
"DD_SITE" = one(module.datadog_configuration[*].datadog_site)
"DD_API_KEY" = module.datadog_configuration.datadog_api_key
"DD_SITE" = module.datadog_configuration.datadog_site
"DD_ENV" = module.this.stage
"DD_LOGS_ENABLED" = true
"DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL" = true
Expand Down
1 change: 0 additions & 1 deletion modules/ecs-service/remote-state.tf
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ data "jq_query" "service_domain_query" {
}

module "datadog_configuration" {
count = var.datadog_agent_sidecar_enabled ? 1 : 0
source = "../datadog-configuration/modules/datadog_keys"
enabled = true
context = module.this.context
Expand Down

0 comments on commit 6313fe7

Please sign in to comment.