This may be an outsider's too simple of a solution to the Azerbaijan/Armenia conflict but the problem seems to be one where what you have is a big carve out of land in Azerbaijan by people that want to be part of Armenia and you have a similar swath of land in to the southwest of Armenia that is considered part of Azerbaijan. Why don't the parties make a peace deal where they just swap the land, Nagorno-Karabakh region becomes permanently part of Azerbaijan and the Azerbaijan land bordering Iran permanently becomes part of Armenia; Armenia may have to give up a little more territory to make it a fair deal, this writer is no expert on the matter, but the countries would get continuous sovereign territory and permanent peace, the deal would require most of the people in the respective areas to relocate to the traded for land so ethnic factors don't regrow the conflict over time but again the benefit would be permanent peace!
Under the USSR, everyone lived peacefully, without war. And Azerbaijanis married Armenian women and vice versa. But someone suggested to them that they were suffering under the yoke of the Russian Empire. They wanted to become independent - well, they got independence. Who do you think is to blame for the Armenians now? Right! The Russians are to blame!