[flagged]
From what I see, Iran absolutely needs one to be left alone.
As for terrorism you should be looking at Saudi Arabia and Pakistan.
This gives them enough deterrence against a total invasion (because of the "what if" factor) but not against random airstrikes.
India will not dare to overrun Pakistan nor does it want to. (Few crackpots from both those countries aside)