NEC does allow cord / plug connected pool motors as long as the cord isn't over 3 feet and is a single twist lock style receptacle and protected by a GFCI breaker. You will also want to use an in-use type cover.
680.22 Area Lighting, Receptacles and Equipment.
(A) Receptacles.
(1) Circulation System, Location. Receptacles for pool, outdoor spa, and hot tub motors or other loads directly related to the circulation system shall be located at least 10 ft from the inside walls, or not less than 5 ft from the inside walls if the receptacle is: Figure 680-5 un680-05 680-22A1 01.cdr
(1) A single receptacle.
(2) Of the twist-lock type.
(3) Of the grounding type.
(4) GFCI protected.