It's the same as the normal configuration except that you use the FQDN with the set peer command under the crypto map and ensure that you configure a dns server on the router that can resolve the FQDN to an IP address.
I've never tried this before I just assume that's how it would work.