Use this Terraform module to install Datadog monitoring for AWS Elastic Container Service tasks.
This Terraform module wraps the aws_ecs_task_definition resource and automatically configures your task definition for Datadog monitoring.
For more information on the ECS Fargate module, reference the submodule documentation.
module "datadog_ecs_fargate_task" {
source = "DataDog/ecs-datadog/aws//modules/ecs_fargate"
# Datadog Configuration
dd_api_key_secret = {
arn = "arn:aws:secretsmanager:us-east-1:0000000000:secret:example-secret"
}
dd_tags = "team:cont-p, owner:container-monitoring"
# Task Configuration
family = "example-app"
container_definitions = jsonencode([
{
name = "datadog-dogstatsd-app",
image = "ghcr.io/datadog/apps-dogstatsd:main",
}
])
}