Nobody mentioned Putin, but that is incorrect. Russia and Armenia have had a military aid pact since the 90’s, Putin gave the Azeri PM an ultimatum to broker a peace agreement.
The peace agreement was very much in Azerbaijan’s favor. They get the pipeline. Armenians abandon their 1,000-year-old churches and homes and go ‘way.