Water Heater locations

Is it a code violation to have a 30 gal. electric fat boy water heater located under the hvac in condo’s? It is in a utility closet.

Can a gas water heater be located under a pier and beam home which extends outward over a hill with all 3 sides exposed to the outside. It is on a concrete slab along with the hvac.

In San Antonio, you can put the electric water heater in the bottom of mech closet with the electric HVAC condenser above it. The air draws around the water heater and up into the condenser. ](*,)

I write that ‘I consider it a safety hazard’. An electrical fire at the water heater would spread up and through the ductwork.

On the exterior water heater, I believe it would need to follow the flue ‘b’ vent termination clearance of 2’ above vertical surfacw within 8’ rule IRC 2427.6.5

Larry, read this thread, it discusses your 1st question: http://www.nachi.org/forum/showthread.php?t=15780&highlight=water+heater+return