In late November, Iran conducted a five day exercise to see how well its air and ground forces could defend against an air attack. The results were not what they expected.
Israel has been threatening such an attack if Iran does not halt its nuclear weapons development. The Iranian exercise had air and air-defense units go through the motions of dealing with a hostile air strike against Iranian nuclear facilities.
The Iranian generals who organized the exercise were surprised at how uncoordinated and ill prepared their forces were for such an attack. Communications were spotty (due to equipment failures and poor training), and weapons (aircraft and missile systems) did not perform as expected. The Iranians, it appears, were victims of their own propaganda. For years, Iran has been announcing new weapons, that don't exist. Same thing with new initiatives in training and tactics.
If you go back and look at the many Iranian announcements of newly developed, high tech, weapons, all you find is a photo op for a prototype. Production versions of these weapons rarely show up. Iranians know that, while the clerics and politicians talk a tough game, they rarely do anything. Even Iranian support of Islamic terrorism has been far less effective than the rhetoric. The Iranians have always been cautious, which is one reason Arabs fear them. When the Iranians do make their move, it tends to be decisive. But at the moment, the Iranians have no means to make a decisive move. Their military is mostly myth, having been run down by decades of sanctions, and the disruptions of the 1980s war with Iraq. Their most effective weapon is bluster, and, so far, it appears to be working.
But the Iranians know that nuclear weapons would make their bluff and bluster much more muscular. Even the suspicion that they had nukes would be beneficial. And that appears to be the current plan. And that's why Israel is planning to attack. And that's why the Iranians have their work cut out for them.