Martignat (; ) is a commune in the Ain department in the Auvergne-Rhône-Alpes region in eastern France.