Sounds like he's both trying to dissuade Iran from bombing Israel and signaling that Iran can bomb Israel a little, as a treat.
Trump on the Beirut strike: ‘This should not have happened, we are very close to a Deal that will bring peace to the region. Let’s not blow it.’ He calls on all sides to stand down and halt attacks.