bug/docs: CDK-Pipeline children cannot be suppressed without first running buildPipeline()
#925
Labels
documentation
Improvements or additions to documentation
What is the problem?
NOTE: This could easily be considered a documentation problem, but for the sake of thoroughness I'm filing it as a bug.
When attempting to suppress elements of a CDK Pipeline, specifically one from the
aws-cdk-lib/pipelines
package, an error is thrown unless.buildPipeline()
is called before the suppressions are applied.Reproduction Steps
Clone this example repo and attempt to
yarn cdk synth
.You should receive this error:
The fix is simple: uncomment the
dummyPipeline.buildPipeline()
call insrc/Pipeline/DummyPipeline.ts
. After this, it will suppress as intended.What did you expect to happen?
I was expecting the suppressions to be applied as expected.
What actually happened?
This error is thrown:
cdk-nag version
2.14.46
Language
Typescript
Other information
I don't necessarily think it's on Cdk-Nag to fix this "issue", but adding a more helpful annotation and/or section to the readme on what exactly is meant by the below text snippet would be very helpful.
I was stuck on this for a little bit until someone else who happened to know about
.buildPipeline()
came along and pointed out the issue.The text was updated successfully, but these errors were encountered: