I wanted to provide a little perspective on Iran but it took much longer than I anticipated because the Wiki page for Iran is almost totally locked up due to heavy usage. Here are some stats on the country from Wiki:
With 82 million inhabitants, Iran is the world's 18th most populous country. Its territory spans 1,648,195 km2 (636,372 sq mi), making it the second largest country in the Middle East and the 17th largest in the world.
Its central location in Eurasia and Western Asia, and its proximity to the Strait of Hormuz, give it geostrategic importance. Tehran is the political and economic center of Iran, and the largest and most populous city in Western Asia with more than 8.8 million residents in the city and 15 million in the larger metropolitan area.
By way of contrast Iraq and Afghanistan have 38 and 32 million people, respectively. Each is a fraction of the size of Iran.
The economy of Iran is very different from that of Iraq or Afghanistan. Iraq is all about oil. Iran is a big oil producer as well but it has an advanced industrial capacity that Iraq lacks.
A significant aspect of their industrial capacity is that they decided many decades ago to make themselves militarily self sufficient so that they could provide a strong military deterrent regardless of what embargoes Western nations might place upon them. They can manufacture all manner of modern weaponry and platforms. In this they are largely self sufficient, including an array of ballistic missiles.
Regarding their military, again Wiki:
The Islamic Republic of Iran has two types of armed forces: the regular forces of the Army, the Air Force, and the Navy, and the Revolutionary Guards, totaling about 545,000 active troops. Iran also has around 350,000 Reserve Force, totaling around 900,000 trained troops.
The government of Iran has a paramilitary, volunteer militia force within the Islamic Revolutionary Guard Corps, called the Basij, which includes about 90,000 full-time, active-duty uniformed members. Up to 11 million men and women are members of the Basij who could potentially be called up for service. GlobalSecurity.org estimates Iran could mobilize "up to one million men", which would be among the largest troop mobilizations in the world.
But it goes much deeper than that. Recall when the U.S. trained Iraqi army literally dropped their arms and fled from advancing ISIS troops, surrendering most of Iraq in a matter of days. What stopped them was disciplined Kurd forces in the NE and, wait for it, Iranian backed militias. It would be the Iranian militias, together with the Kurds, that would ultimately lead the successful fight against ISIS.
In ISIS you had highly dedicated religious zealots eager to die in battle. They were not pushovers. Every foot of ground had to be taken from them. This is the level of discipline and skill that the Iranians command. Like the Kurds they are battle hardened, smart and highly dedicated soldiers.
And Iran shares many of the same strategic interests in the Middle East as does Russia. They backed Assad’s forces alongside Russian forces in Syria. There is every reason to believe that Russia will do everything it can to assist Iran in a confrontation with the U.S., just like we did against them in Afghanistan.
Iran has close military ties all across the Middle East and Africa. It has always been a regional player. And its proximity to the Straits of Hormuz means it can readily disrupt the transport of oil through the straits. About 20 percent of all oil shipments globally go through the straits.
Trump wants a war to make himself a heroic figure. He will instead crash the global economy and destroy our standard of living for decades to come while killing and maiming millions of people. This is why you don’t elect a malignant narcissist to be President of the most powerful nation on earth.