There are additional requirements for gas water heaters. If a gas water heater does not get enough combustion air the flame cannot burn to heat the water. If inadequate venting is installed, dangerous carbon monoxide gas can build up causing illness and even death. It is prohibited for a gas water heater other than those as "direct vent type" to be installed in a bedroom or bathroom unless meeting special criteria. Check for local requirements.
To have a gas water heater, you will need a supply of gas. If you are going to install gas piping or change the gas piping you already have, a separate gas-piping permit must be obtained. The gas piping must not block the removal of the tank. Always adhere to the manufacturer’s installation instructions.
You must protect your water heater in case of an earthquake by placing seismic bracing on the tank. The bracing must be two 20-gauge sheet metal straps. One strap must be on the upper third of the tank and the other on the lower third of the tank. Approved seismic bracing kits for water heaters are available at many retail outlets.
If your water is on a closed system (the water can flow into your building but not out), an expansion tank or other approved thermal expansion device must be installed on your water system. The expansion tank is to hold water that can't be held in the water heater after it expands when it gets hot. If there were no expansion tank, the hot water would be released through the pressure relief valve.
Temperature and pressure relief valves:
The temperature and pressure relief valve is a valve that allows pressure to be released if the water heater gets too hot. The valve connects to a pipe that runs to an approved termination point. The pipe must run the water via gravity to the outside or to an approved drain. Always adhere to the manufacturer’s installation instructions regarding location of the temperature & pressure relief valve.