Skip to content

Conversation

@github-anis-snoussi
Copy link

@github-anis-snoussi github-anis-snoussi commented Jan 23, 2023

Note: Please remember to review the contribution guidelines
if you have not yet done so.

What does this PR do?

Add the ability to set tags for the forwarder lambda from the main cloudformation template.

Motivation

  • Having multiple AWS accounts with DataDog integration requires manually setting DD_TAGS to env:my_env in the Forwarder lambda in the AWS Console, otherwise logs will have env:none .
  • Another niche reason is having to manage the integration with CDK ( example code bellow ), and with each deployed update to the integration, I have to set the DD_TAGS in the integration again.
    new cfn.CfnStack(this, 'datadogIntegration', {
      templateUrl: 'https://datadog-cloudformation-template.s3.amazonaws.com/aws/main.yaml',
      parameters: {
        ExternalId: externalId,
        DdApiKeySecretArn: apiKey.secretArn,
        DdSite: 'datadoghq.eu',
        CloudTrails: cloudTrailBucket,
        LogArchives: logArchives,
      },
    });

Testing Guidelines

This is how I manually used to achieve having environment tags in the forwarder lambda.

Additional Notes

Anything else we should know when reviewing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant