How do I instruct Pulumi to invoke my custom Typescript function when pulumi up
or pulumi destroy
is invoked from command-line?
I tried invoking my function from the main code block, but it is getting invoked multiple times on pulumi up
.
Further, there are some commands I only want to invoke for up
and others that should only be invoked for destroy
.