The invention relates to the triazolopyridine carboxamide derivatives and triazolopyrimidine carboxamide derivatives of general formula (I): Wherein X, A, R1 and R2 are as defined herein. The invention further relates to preparation methods and therapeutic use thereof.