DataDog / datadog-cdk-constructs

CDK construct library to automagically instrument your Lambda functions with Datadog
Apache License 2.0
64 stars 28 forks source link

DataDogKey Secret not accept Secret which contains JSON format with multiple Secrets. #316

Open ranayash45 opened 3 days ago

ranayash45 commented 3 days ago

Expected Behavior

Secret: { "Other Secret":"", "Datadog_Secret":"", }

Input:- Datadog_key Secret Name: "Datadog_Secret"

OR

Provide way to give key in plain format and Datadog construct handled in it its own way.

Actual Behaviour

Currently it will accept only Key inside the secret.

Steps to Reproduce the Problem

  1. Put Datadog Key in Secrets in JSON Format.
  2. Passed ISecret into Datadog Construct.
  3. Deploy app on AWS CDK to check whether Key is loaded or not. (Cloud Watch Logs Helpful Here).

Specifications

Stacktrace

  Paste here
purple4reina commented 2 days ago

Hi @ranayash45,

Thanks for reaching out. As you mentioned, our Datadog Lambda Extension only supports plaintext secrets, not secrets inside of json objects. Therefore, you will need to create a new secret just for your Datadog API key.

Is there a specific reason why this does not work for you or is not preferred?