Several locations supply plumbing codes for hot-water heaters. On its website, EZ Tankless provides links to download code books for a large number of U.S. states. Another good resource is a state department of licensing or building codes. Codes may also be available at a local library.
A person considering water heater plumbing or installation should check with the city's municipal offices to see if any local ordinances exist regarding this work. For example, earthquake-prone areas may have specific regulations about water heater installation. Some localities may also require that a building permit be obtained before this work is performed or that a licensed plumber reviews the work after it is completed.