One thing to note about your textbook definition of terrorism is that it would also seem to include the bombing of civilian populations during World War II in cities like Dresden, Tokyo, Hiroshima, Nagasaki, etc. Is that a road you really want to go down?
They are generally considered acts of war.
Again the military doesn’t typically target civilians to elicit terror. That doesn’t mean it never happens nor implies that a military in the midst of war doesn’t commit terrorist attacks.