How is The Sun Also Rises a secondary source?
The Sun Also Rises is a primary source if you are writing as essay on this novel.
Primary sources are inside works, in a manner of speaking. When writing about a work of literature, or a work of art of any kind, the art will be the primary source. Secondary sources are outside works that comment on the primary source or supplement it.
For instance, if you are writing an essay on The Sun Also Rises and you look at a quote from Gertrude Stein or a passage from a work of literary criticism these will be secondary sources.
However, if you are writing an essay on bull fighting instead of The Sun Also Rises, the novel can then be understood as something other than a primary source.