A building permit is required for all in-ground, above-ground and on-ground swimming pools, hot tubs and spas. An exception would be a prefabricated portable swimming pool that is less than 18 inches deep.
As part of the required building permit, a (child proof) barrier is required in compliance with section AG105, Appendix G, International Residential Code (IRC). The barrier shall be used to entirely enclose the swimming pool, spa, hot tub, or other contained bodies of water (18 inches or more in depth), meeting the following criteria:
Minimum five foot non-climbable wall/fence or other permanent non-climbable wall/fence or other permanent non-climbable barrier structure, as measured from the exterior side of the barrier structure
Walls, fences and all other permanent non-climbable barrier structures shall have no openings through which a spherical object four inches in diameter can pass
The maximum vertical clearance between grade and the bottom of the barrier shall be two inches measured on the side of the barrier which faces away from the pool area
Gates shall be self-closing, self-latching, opening outward from the pool area and having self-latching hardware at a height of at least 54 inches from the the bottom of the gate
If the exterior wall of the residence is part of the barrier, any doors (including doors from the garage) leading into the pool area must be self-closing, self-latching, with self-latching hardware at a height of at least 54 inches from the interior door threshold. All window latching hardware must be at least 54 inches from the interior walking surface
Locate useful information regarding swimming pools and spas by reading: