As an attack on Iran IS AN ATTACK ON RUSSIA,  
 forming a defensive alliance is a way to prevent the attack, perhaps the only way.  An alliance would simply be a formalization of the implied, de facto alliance that already exists.  It would actually reduce the threat against Iran and Russia and is the surest way of stabilizing the dangerous situation.