terraform-aws-modules / terraform-aws-datadog-forwarders

Terraform module to create resources on AWS to forward logs/metrics to Datadog 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/datadog-forwarders/aws
Apache License 2.0
56 stars 41 forks source link

feat: add support for datadog tags #3

Closed Vrtak-CZ closed 3 years ago

Vrtak-CZ commented 3 years ago

Description

Pass var.dd_tags as DD_TAGS environment variable to log forwarder function.

Motivation and Context

We want to tag logs with some general tags.

How Has This Been Tested?

We are using our fork with this feature in our environment.

bryantbiggs commented 3 years ago

hi @Vrtak-CZ - thanks for the PR! You can already pass in any of the environment variables that the forwarders support - you can see an example showing this here https://github.com/clowdhaus/terraform-aws-datadog-forwarders/blob/21467e2c7805c40c3a79dc1cc244e0cc371ede87/examples/complete/main.tf#L158

So you can set this variable and pass in your DD_TAGS and whatever key, value pairs you want to add. Any of the environment variables can be passed to the forwarders in this manner so its quite flexible https://github.com/DataDog/datadog-serverless-functions/blob/b27b5918960953549c759b51ae3ea87911594c30/aws/logs_monitoring/settings.py#L100

github-actions[bot] commented 1 year ago

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.