How to make synth execution fail when using deprecated properties and constructs #27491
Unanswered
sakurai-ryo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I want to make synth execution fail when using a deprecated property or construct.
For example, consider the following code
When I run synth with this code, I get two warnings as follows
The first warning is that BucketEncryption.UNENCRYPTED has a deprecated annotation in TSDoc.
The second warning is a warning in the CDK code using methods such as addWarningV2.
If I use the --strict option of synth command, only the second warning will be treated as a failure.
The following code successfully executes synth even when the --strict option is used.
In this case, for example, if I use BucketEncryption.UNENCRYPTED, is there any way to make the synth execution fail?
I know that it can be detected by using a mechanism other than CDK, such as eslint-plugin-deprecation, but I would like to know if there is such a way with the CDK mechanism.
Beta Was this translation helpful? Give feedback.
All reactions