'When defining a CodePipeline via CDK, how to prevent it running 1st time automatically?

I am defining some CodePipelines in my CDK project, but am running into an annoying issue: Whenever the pipeline is created for the 1st time, it automatically starts to execute. This behavior persists even if I disable triggerOnPush for the source.

Anyone know how to disable this behavior?

I know there are some workarounds like adding a "manual approve" step or something, but this is not what I want. I just want to create the pipeline and leave it in a "never ran" state.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source