Terrorism used to be defined as attacking civilian targets to aid in political messaging.
Attacking military targets is somewhere between an insurgency, partisanism, or an armed conflict.
If we let terrorism mean “any act against the state”, then people who burn police cars are the same as people who plant bombs in shopping malls.