It's really complex. This attack was bad for the Iranian Government, their proxy war allies, and for the American people. In the region, however, it disrupted a rapidly escalating disaster. What comes after this is hard to predict, but what would come from the existing situation was hard to avoid. Second and higher order consequences might eventually be good for the people living in that region.