Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# and another the rest of the directory.

# All your base
* @DataDog/container-platform
* @DataDog/container-platform
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@


**Additional environment details (Operating System, Agent telemetry, etc):**
<!-- Other relevant details such as agent version, agent status, relevant agent logs, etc. --->
<!-- Other relevant details such as agent version, agent status, relevant agent logs, etc. --->
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Validate your changes before merge, ensuring that:
* Anything else we should know when reviewing?
* Possible drawbacks and tradeoffs.
* Include info about alternatives that were considered and why the proposed version was chosen.
-->
-->
23 changes: 23 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check formatting

permissions:
contents: read

on: [pull_request, workflow_dispatch]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"

- name: Install pre-commit
run: pip install pre-commit

- name: Run pre-commit hooks
run: pre-commit run --all-files --hook-stage manual
1 change: 0 additions & 1 deletion .github/workflows/terraform-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
pull_request:
paths:
- "modules/ecs_fargate/**"
- ".github/workflows/terraform-docs-check.yaml"
workflow_dispatch:

jobs:
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ crash.log
crash.*.log

# Exclude all .tfvars files, which are likely to contain sensitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
*.tfvars.json
Expand Down Expand Up @@ -44,4 +44,4 @@ build
target
bin
obj
.DS_Store
.DS_Store
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: end-of-file-fixer
exclude: ^(LICENSE-3rdparty\.csv|NOTICE)
stages: [manual, commit]
- id: trailing-whitespace
exclude: ^(LICENSE-3rdparty\.csv|NOTICE)
stages: [manual, commit]

- repo: local
hooks:
- id: make-fmt
name: Run make fmt to format terraform code
entry: make fmt
language: system
types: [text]
stages: [commit]
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true
}
}
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ license:
dd-license-attribution https://github.com/datadog/terraform-aws-ecs-datadog/ --no-gh-auth > LICENSE-3rdparty.csv
test:
go test ./tests
pre-commit:
pre-commit run --all-files
2 changes: 1 addition & 1 deletion examples/ecs_fargate/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

output "example_module" {
value = module.datadog_ecs_fargate_task.arn
}
}
2 changes: 1 addition & 1 deletion examples/ecs_fargate/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ variable "dd_site" {
description = "Datadog Site"
type = string
default = "datadoghq.com"
}
}
2 changes: 1 addition & 1 deletion examples/ecs_fargate/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ terraform {
version = ">= 5.77.0"
}
}
}
}
2 changes: 1 addition & 1 deletion modules/ecs_fargate/datadog.tf
Original file line number Diff line number Diff line change
Expand Up @@ -394,4 +394,4 @@ locals {
volumesFrom = []
}
] : []
}
}
2 changes: 1 addition & 1 deletion modules/ecs_fargate/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ resource "aws_iam_role_policy_attachment" "new_role_ecs_task_permissions" {
count = local.create_task_role ? 1 : 0
role = aws_iam_role.new_ecs_task_role[0].name
policy_arn = aws_iam_policy.dd_ecs_task_permissions.arn
}
}
1 change: 0 additions & 1 deletion modules/ecs_fargate/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,3 @@ resource "aws_ecs_task_definition" "this" {
}
}
}

2 changes: 1 addition & 1 deletion modules/ecs_fargate/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ terraform {
version = ">= 5.77.0"
}
}
}
}
2 changes: 1 addition & 1 deletion smoke_tests/ecs_fargate/all-dd-disabled.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ module "dd_task_all_dd_disabled" {
])

requires_compatibilities = ["FARGATE"]
}
}
2 changes: 1 addition & 1 deletion smoke_tests/ecs_fargate/all-null.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ module "dd_task_all_null" {
# network_mode = null
# requires_compatibilities = null

}
}
2 changes: 1 addition & 1 deletion smoke_tests/ecs_fargate/apm-dsd-tcp-udp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ module "dd_task_apm_dsd_tcp_udp" {
])
volumes = []
requires_compatibilities = ["FARGATE"]
}
}
2 changes: 1 addition & 1 deletion smoke_tests/ecs_fargate/cws-only.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ module "dd_task_cws_only" {
operating_system_family = "LINUX"
}
requires_compatibilities = ["FARGATE"]
}
}
2 changes: 1 addition & 1 deletion smoke_tests/ecs_fargate/logging-only.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ module "dd_task_logging_only" {
container_definitions = jsonencode([])

requires_compatibilities = ["FARGATE"]
}
}
2 changes: 1 addition & 1 deletion smoke_tests/ecs_fargate/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ output "cws-only" {

output "logging-only" {
value = module.dd_task_logging_only
}
}
2 changes: 1 addition & 1 deletion smoke_tests/ecs_fargate/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ terraform {
version = ">= 5.77.0"
}
}
}
}