Yes, it is as long as it is medically indicated. However, there exist other techniques such as sperm washing that can allow HIV-infected male patients to have a child via IVF without needing a surrogate.
Read the full article on: Infertility & Surrogacy – What Are the Medical Reasons for Surrogacy? ( 74).

Andrea Rodrigo
Bachelor's Degree in Biotechnology from the Polytechnic University of Valencia. Master's Degree in Biotechnology of Human Assisted Reproduction from the University of Valencia along with the Valencian Infertility Institute (IVI). Postgraduate course in Medical Genetics.