I strongly suggest you to use TF 2 cause it will be quite hard to receive support on TF 1.x.
In any case this was an old TF1 tutorial on VAE/MNIST.
https://danijar.com/building-variational-auto-encoders-in-tensorflow/ 1