Submitted by Nick Vahalik on Mon, 04/04/2016 - 12:28
One of my new favorite modules recently has been Field Tools. What I love about it is that it presents you with the ability to export all of the fields on a particular bundle (or even just a single field).
Then, you can just use
field_create_instance in a little loop.
Take for example (in a module's .install file):