Code for Deploy Only in Golang

There is some Go code that I only want to run on cdktf deploys

Is there any way in the CDKTF for Go to detect a deploy vs a synth?

Your application code is only ran during a synth. You could potentially invoked the cdktf cli from your go code, but there’s no official api at this time.