DataDog / cloudformation-template

Easily set up the Datadog AWS integration using CloudFormation
Apache License 2.0
34 stars 42 forks source link

Fix bug when using Secrets Manager #34

Closed duncanista closed 2 years ago

duncanista commented 2 years ago

What does this PR do?

Fix an output bug which causes a rollback even though the config was correct while using Secrets Manager.

Motivation

While adding the Secrets Manager feature (#33), there was a bug which would cause a rollback since there was no condition to check if the Forwarder would output DdApiKeySecretArn. This only happens when you send the API Key in plain text, since it would create a Secrets Manager resource to output. The forwarder template does not output the Secrets Manager ARN if you specify it. Therefore, there is no need to output it here if the user provides it.

Testing Guidelines

Ensured there was no rollback while using Secrets Manager and successfully deployed a testing AWS Integration stack.

Integration stack.

Screen Shot 2021-12-06 at 3 07 06 PM

Forwarder stack.

Screen Shot 2021-12-06 at 3 07 44 PM

Forwarder using Secrets Manager.

Screen Shot 2021-12-06 at 3 08 40 PM

Additional Notes

Tested using a mock Datadog Externald value.