Yes you do if you want Yosemite on the SSD. Before you swap out to the SSD go to the App Store and redownload Yosemite then stop the installer (command-q) when it launches. Then use the app
DiskmakerX and a 8GB USB key to make the installer. Then install the SSD and option key boot to the USB key. From there use Disk Utility to erase the disk to Mac OS Extended (Journaled), Then quit DU and click install OS at the top. That will give you the SSD with a fresh install of Yosemite.
Doing Internet recovery as was suggested earlier will not give you Yosemite like you want. Internet recovery always gives you the OS that shipped from the factory. In your case probably Lion or Mountain Lion OS X.
If you want to go straight to Yosemite you will need to make the USB key.