Skip to main content
Knowledge Base

Reference Architecture: DataDog Terraform module for CloudWatch integration

Answer

DataDog has a Terraform code snippet that could be wrapped into a module and placed in my infrastructure-live repo. If I want this in every current account, and every newly created account, where is the best place to put this? > Use one of the following methods to integrate your AWS accounts into Datadog for metric, event, tag, and log collection. https://docs.datadoghq.com/integrations/faq/aws-integration-with-terraform/ --- <ins datetime="2022-06-01T19:15:13Z"> <p><a href="https://support.gruntwork.io/hc/requests/108702">Tracked in ticket #108702</a></p> </ins>

The best way to set this up would be to add a common configuration for all environments in the `_envcommon` folder, and then add a `terragrunt.hcl` file for each environment that inherits that configuration. Note that you can use [the same general template for deploying service catalog modules](https://github.com/gruntwork-io/knowledge-base/discussions/360) to deploy third party modules as well. The main difference will be the source URL, which should reference the specific git repository or `tfr://` URL if pulling from the Terraform registry (see [here]https://terragrunt.gruntwork.io/docs/getting-started/quick-start/#example) for an example).