It is an attempted coup d'etat but it doesn't seem to be super well organized. Turkey has a long history of the secular military being at odds with overtly religious leadership. Erdoğan is pretty much awful so this could be a very positive thing in the end.