diff --git a/README.md b/README.md index a6d1adf..53bc1b9 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ This repository contains Terraform infrastructure code which creates AWS resourc | [aws_partition.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition) | data source | | [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source | | [aws_route53_zone.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route53_zone) | data source | +| [aws_secretsmanager_secret.creds](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/secretsmanager_secret) | data source | | [aws_vpc.selected](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc) | data source | | [external_external.current_image](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/external) | data source | @@ -118,6 +119,7 @@ This repository contains Terraform infrastructure code which creates AWS resourc | [custom\_environment\_variables](#input\_custom\_environment\_variables) | List of additional environment variables the container will use (list should contain maps with `name` and `value`) |
list(object(
{
name = string
value = string
}
))
| `[]` | no | | [datadog\_agent\_container\_essential](#input\_datadog\_agent\_container\_essential) | Determines whether all other containers in a task are stopped, if this container fails or stops for any reason | `bool` | `false` | no | | [datadog\_agent\_container\_image](#input\_datadog\_agent\_container\_image) | The datadog agent sidecar container image | `string` | `"datadog/agent:latest"` | no | +| [datadog\_agent\_integrations](#input\_datadog\_agent\_integrations) | The datadog agent integrations, see Docker (AD v2) at https://docs.datadoghq.com/containers/docker/integrations/?tab=dockeradv2 |
list(object({
name = string
config = optional(list(string), [])
}))
| `[]` | no | | [datadog\_firelens\_container\_essential](#input\_datadog\_firelens\_container\_essential) | Determines whether all other containers in a task are stopped, if this container fails or stops for any reason | `bool` | `false` | no | | [datadog\_firelens\_container\_image](#input\_datadog\_firelens\_container\_image) | The datadog firelens sidecar container image | `string` | `"amazon/aws-for-fluent-bit:stable"` | no | | [datadog\_service\_name](#input\_datadog\_service\_name) | The datadog service name | `string` | `""` | no | @@ -158,6 +160,7 @@ This repository contains Terraform infrastructure code which creates AWS resourc | [policies\_arn](#input\_policies\_arn) | A list of the ARN of the policies you want to apply | `list(string)` |
[
"arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"
]
| no | | [private\_subnet\_ids](#input\_private\_subnet\_ids) | A list of IDs of existing private subnets inside the VPC | `list(string)` | `[]` | no | | [public\_subnet\_ids](#input\_public\_subnet\_ids) | A list of IDs of existing public subnets inside the VPC | `list(string)` | `[]` | no | +| [repository\_credentials\_name](#input\_repository\_credentials\_name) | The SecretsManager Secret Name of the repository credentials to use | `string` | `null` | no | | [route53\_record\_name](#input\_route53\_record\_name) | Name of Route53 record to create ACM certificate in and main A-record. If null is specified, var.name is used instead. Provide empty string to point root domain name to ALB. | `string` | `null` | no | | [route53\_zone\_name](#input\_route53\_zone\_name) | Route53 zone name to create ACM certificate in and main A-record, without trailing dot | `string` | `""` | no | | [secret\_path](#input\_secret\_path) | path to append to IAM secrets access policy | `string` | `""` | no | diff --git a/dd-agent.tf b/dd-agent.tf index 9cd3807..77b5aea 100644 --- a/dd-agent.tf +++ b/dd-agent.tf @@ -1,5 +1,4 @@ module "datadog_sidecar" { - source = "cloudposse/ecs-container-definition/aws" version = "v0.58.1" @@ -62,4 +61,13 @@ module "datadog_sidecar" { }, ] -} \ No newline at end of file + # See https://docs.datadoghq.com/containers/docker/integrations/?tab=dockeradv2 for more information + docker_labels = { + "com.datadoghq.ad.checks" = jsonencode( + { + for name, config in var.datadog_agent_integrations : + name => { instances = config } + } + ) + } +} diff --git a/variables.tf b/variables.tf index 369f75e..32085cc 100644 --- a/variables.tf +++ b/variables.tf @@ -562,6 +562,15 @@ variable "datadog_service_name" { default = "" } +variable "datadog_agent_integrations" { + description = "The datadog agent integrations, see Docker (AD v2) at https://docs.datadoghq.com/containers/docker/integrations/?tab=dockeradv2" + type = list(object({ + name = string + config = optional(list(string), []) + })) + default = [] +} + variable "datadog_tags" { description = " Tags for datadog agent container." type = string