Break out dns record creation into its own function