Right now, I think the deterrent is two-fold with Trump/US retaliation a distant 3rd.
1) Increasing tension on the home front. A lot of Iranians are not happy with their current leadership
2) Increasing scorn from other European countries and the real threat that Iran could find itself isolated from the world much like N. Korea
3) Would be US involvement/conflict, but I don't think that's a huge deal. They're willing to fight an enemy (us), but it comes with the possibility of isolation, which would further divide Iran from within as their common people increasingly suffer as a result of their government's actions. I think that is the real deterrent from them aggressively engaging us at the moment.