If my water heater was in a flood, do I need to replace it?

From the AHRI website (www.ahrinet.org), as it pertains to water heaters:
Whether your water heater is gas-fired, oil-fired or electric, if it was exposed to flood water, the unit should be replaced. In a gas unit, valves and controls will likely corrode. In an electric unit, the thermostat and controls will likely corrode. In both types, the insulation surrounding the unit will be contaminated and will be nearly impossible to disinfect.

Additionally, the insulation will take a long time to dry completely and may lead to corrosion of the tank from the outside.

Be sure that at time of the new water heaters installation, the Temperature and Pressure Relief Valve is new as well. Using a Temperature and Pressures Relief Valve that was subject to flood water is not advisable.

Prior to connecting the gas supply line to a gas fired water heater, ensure that the gas supply line does not have moisture/water or dirt/scale inside the gas line. Commonly this check is done at the lowest point in the gas distribution system prior to gas burning appliances.