You must understand that terrorists, although they may ultimately derive their financial resources or other assets from a government or governments, are theoretically stateless themselves - they're rather like international corporations, in their way - because they reject the idea of a state, they don't wish to be controlled by a state, they have had their state taken away from them or destroyed, they have been denied a chance to create a state of their own, or they were created to provide some government somewhere with what's called 'credible deniability'.
When individuals not affiliated with a national government commit violent acts, they are - and ought to be dealt with as - criminals, nothing more and certainly nothing less. Rather than indiscriminately destroy entire nations full of innocent people in retaliation for the criminal behavior of a few, guilty individuals should be pursued and either killed, or captured, tried, and on conviction, appropriately punished.