According to Code, unions are to be installed within____of a water heater?

According to Code, unions are to be installed within____of a water heater?