I am not an expert in international affairs by any means, but I would like to propose a resolution; that any member of the United Nation that attacks a country (even in defence), whether the attacked country is a UN member or not, be responsible for replacing, to an equivalent or higher standard, any infrastructure and property that is damaged or destroyed as a result of the attacking country's actions.
Any country that harbors terrorist groups that have attacked another country will also be deemed an "attacking country".
The penalty for not complying is revocation of UN membership until the obligations of the attacker are fulfilled. A third party country, agreed upon by the attacker and attackee, will assess the property and infrastructure to be replaced and will be responsible for reporting on when reparations are made so that the country may obtain member status again.
Countries that are not currently UN members, who are seeking membership or will be seeking membership in the future, will be subject to the same conditions, as of the date of this resolution.
Who knows...maybe a resolution like this will make countries think twice about the cost of war.