First off, Iran is no Iraq or Afghan or Libya...
Iraq didn't even have any air defense when they were invaded. Seriously they literally had like 0.1% of air defense to protect 100% of their country...
Afghanistan was bombed back to stone age by the Russians before America decided to invade Afghan. Afghan was set back 70 years by the Russians before America decided to invade.
Libya was a welfare country with no proper military. They, have less than 5000 air force personal, their best air defense was only a few missiles that were soviet technology. Libya has no air force personal training.
So after all this....It took America 10 years to pull out of Iraq...A country with no air defense or proper military.
After 8 years, America is still in Afghan, even tho Afghans military is one of the worst equipped and Libya was a welfare state with no military, they were focusing more on developing their own economy through oil....
So I explained everything above, now Iran has build their own missiles, owns fighter jets and own radars. They are a middle class country with modern technology and tanks. Iran is ranked #12 in military strength.
Do you actually think America has the strength to take on Iran???? It took over 10 years to finally withdraw from Iraq which is a country with no air defense and no military and is ranked 48th in the worlds military!!! At one stage, America had over 150,000 military personal in Iraq...
Do you really think America could actually win? If America did invade, they would take atleast 80 years minimum to win...
According to GlobalFirepower, Libya is ranked #39 in military strength, Iraq is ranked #48 and Afghanistan is ranked #52 and Iran is ranked #12.
So don't think it's as easy as drinking water. It's more complicated than you think. America invaded Iraq because they thought they had nukes but it was proven than Iraq had no nuclear weapon as all!! The only reason why America invaded Iraq was because of their weak military.
America already knows that Iran is developing a nuclear weapon and the only reason they won't invade Iran is because they know Iran will put up one hell of a fight and this will destabilize the region and cause friction between the world powers (Russia, China, America) because Russia and China will be supplying Iran with weaponry while America will be supplying Israel with weaponry etc...
Why do you think there is no uprising in Iran? Because 99% of the people want a nuclear weapon to defend themselves from Israel who has threatened over 1 million times to bomb Iran.
So to answer your question on why America is against attacking Iran, well, because it would NOT be a walk in the park for America...Iran actually has the capability to defend themselves...
Iran will have nuclear capabilities no matter what the outcome.