This is an important bit of analysis from Colin Kahl, the former deputy assistant secretary of defense for the Middle East (who, by the way, has spent much of the past three years working to strengthen the U.S.-Israel defense relationship):
A near-term U.S. or Israeli attack on Iran's nuclear program would knock it back, at most, a few years. Meanwhile it would motivate Iran's hardliners to kick out International Atomic Energy Agency (IAEA) inspectors, incentivize the regime to rapidly rebuild a clandestine nuclear program, and rally the Iranian people around that cause to deter future attacks.
Consequently, in the aftermath of an Israeli or American strike, Washington would have to encircle Iran with a costly containment regime--much like twelve-year effort to bottle up Saddam Hussein after the 1991 Gulf War--and be prepared to re-attack at a moment's notice to prevent Iran from reconstituting its program. And with inspectors gone, it would be much more difficult to detect and prevent Iran's clandestine rebuilding efforts. The net result would be a decades-long requirement to contain an even more implacable nuclear foe.
Unless an attack on Iran forced the current regime to crumble, which it most likely won't, what Kahl describes might very well come to pass. There is a chance, of course, that a sustained attack (of the sort only the U.S., not Israel could launch), could convince the Iranians that it is not worth their while to continue their nuclear pursuits. But this seems not-entirely plausible: The Iranian regime would then know its days are numbered, in the manner of Saddam and Qaddafi. The likelihood is that the Iranians would try to reconstitute their nuclear program as quickly as possible, openly (and, presumably, with outside help), and that this would force the West to keep bombing ad infinitum, which seems like not such a great thing. Sanctions now appear to be working, to at least a modest degree. More time is needed to let those sanctions bite.