Who gave the order? Ultimately, the President… relayed on down.
But to address the second part, about it being ‘not involved in combat,’ that is irrelevant.
If you’re fighting someone, all their armed units are fair game. Doesn’t matter if they’re actively involved in combat or not.
Take ARA General Belgrano for example, an ex-USN Brooklyn class light cruiser of the Argentine Navy. HMS Conqueror sank her during the Falklands War while the ship was outside Britain’s declared ‘Exclusion Zone.’ Frankly, as a gun-armed ship in the missile age, Belgrano was not much of a threat even if she had been in that zone.
Didn’t matter, she was a legitimate military target. Even her captain admitted as much.
And by the way, since someone is always going to pop up to say this, Neither Argentina nor Britain ever officially declared war in that conflict. So no, it doesn’t matter that war has not been officially declared on Iran.