Iran didn't attack Afghanistan.
You probably meant Azerbaijan, which is the only country without US assets that Iran attacked (once, then apologised, and explained that the losses in the military leadership created special issues with the military orders, which, fair).