Chapter 2 of the national electrical code nec does not specifically exclude outlets.
Do receptacles in the attic have to be gfci.
Gfci receptacles are required in bathrooms garages crawl spaces basements laundry rooms and areas where a water source is present.
The nec requires gfcis on all exterior and bathroom receptacles.
Gfci protection can be provided by a gfci receptacle one receptacle will protect others downstream in the circuit and the other protected receptacles should be marked as gfci protected a gfci circuit breaker in the electric panel or a gfci dead front often used for indoor spa tubs and mounted on the wall in the bathroom or.
Where gfcis are required.
Older homes are not required to have gfci outlets unless the wiring is being updated but it s a good idea to install them anyway.
Gfci protection shall be provided for all 15a and 20a 125v single phase receptacles in dwelling unit unfinished portions or areas of basements not intended as habitable rooms.
To begin with though there is no code violation involved with having a receptacle in your attic space.