Hamas started a war by targeting innocents.
Wars kill people...lots of non-combatants as well.
That leaves only two options for Israel:
(1) Israel surrenders to Hamas to avoid killing non-combatants, and Hamas puts all Israeli's to death; or
(2) Israel fights back and teaches Hamas a lesson while trying to minimize non-combatant deaths (e.g., by warning the population to move away before attacks, and to not allow Hamas to use them as human shields).
Clearly, option 1 involves more deaths and evil moral goals winning the day, and option 2 involves less death, and admirable moral goals (e.g., trying hard to avoid innocent deaths of Gazans, while trying to stop future attacks on innocent Israelis). The morality seems clear here, unless Israel wants to behave in a pacifist manner, and I would say that option was shown to be a mistake in Nazi Germany. Remember, we are talking about "from the river to the sea" people here...basically modern day Nazis seeking to exterminate the Jews.