Skip to content

Commit ceb1759

Browse files
authored
fix: Terraform interface updates (#9)
* Disable logging by default * Create dummy main level module * Readme to clarify submodules
1 parent 445147e commit ceb1759

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
# Datadog Terraform module for AWS ECS Tasks
1+
# Datadog Terraform Modules for AWS ECS Tasks
22

33
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/DataDog/terraform-aws-lambda-datadog/blob/main/LICENSE)
44

55
Use this Terraform module to install Datadog monitoring for AWS Elastic Container Service tasks.
66

77
This Terraform module wraps the [aws_ecs_task_definition](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition) resource and automatically configures your task definition for Datadog monitoring.
88

9+
**Warning: This root module is not intended for direct use.** This repository is a collection of Terraform submodules for different ECS Datadog task configurations.
10+
911
For more information on the ECS Fargate module, reference the [documentation](https://github.com/DataDog/terraform-ecs-datadog/blob/main/modules/ecs_fargate/README.md).
1012

1113
## Usage
1214

15+
### ECS Fargate
16+
1317
```hcl
1418
module "datadog_ecs_fargate_task" {
1519
source = "../../modules/ecs_fargate"

main.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
terraform {
2+
required_providers {
3+
null = {
4+
source = "hashicorp/null"
5+
version = ">= 3.0"
6+
}
7+
}
8+
}
9+
10+
resource "null_resource" "fail" {
11+
provisioner "local-exec" {
12+
command = "echo 'This module is not meant to be used directly. Please use one of the submodules under /modules instead.' && exit 1"
13+
}
14+
}

modules/ecs_fargate/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ variable "dd_apm" {
156156
variable "dd_log_collection" {
157157
description = "Configuration for Datadog Log Collection"
158158
type = object({
159-
enabled = optional(bool, true)
159+
enabled = optional(bool, false)
160160
fluentbit_config = optional(object({
161161
registry = optional(string, "public.ecr.aws/aws-observability/aws-for-fluent-bit")
162162
image_version = optional(string, "stable")

0 commit comments

Comments
 (0)