There's almost no analyst who believes Israel could wipe out Iran's nuclear program. Israeli planners estimate that the best they could do would be to set back Iran's nuclear program by three to five years.
Many analysts believe an attack would become inevitable if Israel were convinced that Iran was about to obtain a nuclear weapon. But they also believe that Iran's intention is less about acquiring a bomb as quickly as possible, and more about "acquiring the ability to acquire the ability."
Developing a nuclear fuel cycle that can produce bomb grade material, improving the expertise of engineers, and otherwise establishing what's often referred to as a "breakout capacity" is a route pursued by other nations in the past – which creates the specter of deterrence while maintaining some ambiguity.
Would delaying the arrival of a "breakout capacity" by five years be worth it? Perhaps, particularly if one thinks that political change in Iran could likely emerge in the interval.
But many fear that such an attack – which would showcase Iran's vulnerability – would embed a desire for nuclear weapons within Iran.
Assessing the effectiveness of an attack without troops on the ground – a highly unlikely eventuality – would prove very difficult. And Iranian cooperation with international inspectors would inevitably be curtailed after an assault, making future nuclear efforts inside Iran more opaque to the world.