Is mgcl2 an ionic or covalent bond

Is mgcl2 an ionic or covalent bond