I couldn’t find in the docs of the pulumi package,...
# typescript
w
I couldn’t find in the docs of the pulumi package, but is there a way to check if I’m currently in preview/update/destroy etc. ?
w
To clarify, are you asking if there’s a way to inspect the current operation from inside your TypeScript program? Something like:
Copy code
if (process.env["PULUMI_OPERATION"] === "PREVIEW") {
    // Perform logic specific to PREVEW operations
} else {
   // Handle Update/Destroy/Up cases
}
w
wonderful thanks
w
Ah, sorry @white-chef-55657 I wasn’t suggesting that already exists, sorry! I’m unsure if it does or not! I wanted to understand your question better.
w
yes - that’s what I’m looking for
is there such thing?
I’m having to write some custom code due to missing provider, want to ensure it only runs in update and not preview
I think this does it
👍 1
🙌 1