Is it possible to know what action (create/destroy) is being executed from inside a TerraformStack?

I’m wondering if there’s any way one could know from within a TerraformStack (or anywhere in code) whether that is being executed due to a “cdktf apply” or “cdktf destroy”…

Hi @RomeroGaliza

What are you trying to achieve with that? Currently there is no way to do this as the synth (which happens before an apply and before a destroy and which runs the code) is not bound to the command which might happen afterwards.