Move connection config out to a macro.