I would use the harness and accessories from the car rather than the new motor.
I have a 1999 A6 with an early version AHA motor. My wife started the car in -20 and went in the house to let it warm up. The oil cooler oring blew out and it ran out of oil. I bought a junk yard AHA motor out of a 1999 A6 also AHA(didn't know there were 2 versions of the AHA). I noticed it has an extra little water pump, and also an extra, large fuse in the ECU box? I installed this engine but the harness won't plug into the plugs next to the ECU? I have the old harness off of the bad motor, can I swap harnesses or will I run into more problems with this?