It's long considered the only honorable, proper response when you can not conscionably act on the requests of your CIC. Not just military, but also Gov't staff and appointees. Your job is, essentially, to carry out those orders, because "kinda like the pope, who is God's Vicar on earth," POTUS is the "will of the American people."
I mean, they are supposed to be...but we have a system where unpopular losers that can not get a majority of votes (therefore, certainly not the will of the people, by any logical metric), can become POTUS.
But yeah, you are supposed to resign, instead of refusing to carrying out a direct order from CiC. One has to wonder, though, what kind of legal and moral boundaries the Orange cheat-ho is very likely trying to cross here, and if that tradition absolutely needs to be tossed to the dust bin in such circumstances.