Putin would have always been able to attack Ukraine. He's not bound to some sort of world government contract. He can do anything in his power as the President of Russia, and that includes attacking Ukraine, even if for stupid or inconsistent reasons. There's nothing that could make him unable to, other than stopping being President.