A French soldier was killed in an attack in Iraq's autonomous Kurdistan region, President Emmanuel Macron said on Friday, confirming the first French military death in the Middle East war.