“No...but I’m also not damn glad’ the United States meddled in the Soviet Afghan war, which gave rise to a terrorist mastermind and spawned numerous atrocities including 9-11...ymmv”
So, your desire would have been to have the USSR take over Afghanistan?
Look at a map. Iran was in turmoil in 1979 (the shah had been deposed early in the year and the US embassy was taken over by the islamists in November). With the USSR controlling Afghanistan Iran would be ripe for the picking (a map is very instructional here: Soviet ally Iraq bordered Iran on the west; the USSR itself bordered Iran along the latter’s entire northern border; Afghanistan and Pakistan bordered Iran on its east; the Persian Gulf and the Gulf of Oman were on Iran’s southern border. The only problem for the USSR exerting hegemony over Iran was Pakistan, which had pretty close ties to the West; and Turkey, which shared a short border with Iran at the latter’s extreme northwest corner. But, the Soviets reasoned that India, a somewhat ally of Russia and a confirmed enemy of Pakistan could be used to exert pressure on Pakistan, and maybe even get Pakistan to give the USSR use of its four southern seaports (Karachi; Qasim; Keti Bunder; and Gwadar). As for Turkey (a NATO country) the Soviets would remain very far away from that border, as its interests would be with the warm water ports on the southern gulfs. Look what the Soviets would have stood to gain if it could neutralize Iran and compromise Pakistan!
The USSR invaded Afghanistan in December, 1979, AFTER the shah was deposed and AFTER the US embassy in Iran was taken over.
Also, remember that Pakistan did not develop a nuclear weapon until May, 1998 (the first successful atomic weapons test by Pakistan). So, it posed no real threat to the USSR.
The Soviets tried to conquer Afghanistan on the cheap, relatively speaking. But, what a gain for the Kremlin had it been successful!