Actually a coup d'etat is just a name for an unconstitutional overthrow of a legitimate government by a small group of the state establishment..... This can be, but doesnt have to be the military. More precisely it would be a Junta if done by the military.
a "coup d'état" is the sudden, frequently forceful, overthrow of a government to replace the ruler by another one.