"If there is any weapon we need, we will develop it for the most part, or procure it if necessary", Rouhani was quoted by Iran's Mehr news agency as saying.
In a speech marking Iran's Army Day on Wednesday, Rouhani said a strong military is an effective deterrence against foreign threats.
In recent days, there have been reports that European countries are considering measures against Iran's ballistic missile programme, in an effort to persuade US President Donald Trump to maintain the Iran nuclear deal.
The Iranian Armed Forces displayed their latest defense technology, including Iran's latest domestically manufactured missile system called Kamin-2.
A low-altitude missile system is created to confront military drones, unmanned aerial vehicles (UAVs) and low-flying planes.
Among other equipment showcased in Tehran were various types of command and control systems, radars, missiles and launchers, tanks, armoured vehicles, rifles, unmanned aircraft, artillery gear and ground combat weapons.
Iranian President Hassan Rouhani (C) and senior members of his armed forces watch a parade on the occasion of the country's annual army day on April 18, 2018, in Tehran.
He also said the Iranian military commanders, like the political officials, have never been after tension and they have been seeking peace and stability in the region.
In an indirect reference to Iran's help to Iraq and Syria in their fight against terrorists, Rouhani said the Iranian military has helped establish regional security.
Iran agreed with the United States and other world powers in 2015 to substantially limit its nuclear development.
The Iranian president stressed to neighboring countries that the weapons were not meant to be used on them, saying "we do not intend any aggression against you".