Open wz2b opened 3 weeks ago
ok I found part of the answer HERE
In a nutshell, it's saying to get rid of the warning by adding:
"@aws-cdk/core:checkSecretUsage": false,
to cdk.json. Note though that the stackoverflow says:
Ideally you'd address the root cause (perhaps the 3rd Party Skill construct?) so the check can remain enabled. But disabling the flag should silence the error.
which I believe to be the right solution ...
I confirmed that by unchecking checkSecretsUsage it still does the right thing i.e. it did not leak my secrets into the cloudformation template. So that's good. Disabling the check is still not a great idea, though, It won't catch it if someone makes a mistake elsewhere.
https://github.com/aws-samples/aws-devops-blog-alexa-cdk-walkthrough/blob/73cbfd23ef1a5281b6080c2135f1142724b38027/lib/alexa-cdk-stack.ts#L18
I tried to use this example:
but it doesn't work:
Unfortunately, adding .unsafeUnwrap() doesn't work either, because that returns a string, not a SecretValue. I cannot figure out a workaround for this. The fact that
new Skill()
accepts a SecretValue tells me it should work.Versions of everything: