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”…
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.