There was a little misinformation in this thread. Having done quite a few of these swaps I wanted to clear a few things up for any future readers.
For the my05 the only parts that need to "match" are the ECU, the immobilizer box which is normally right near your knees and a chip from one of the keys. This set of items can be paired with any appropriate engine. The coil from the ignition doesn't necessarily have to even be from a Subaru but for best results snag one.
If you don't care about immobilizer keys you can zip tie a working key (or even the chip alone) to the coil and put it under the dash somewhere. This will let you start the car with whatever steering column and keyset you wish. This is a great thing when wanting to have door keys match the ignition and you don't want to deal with cutting new keys.
You don't need the gauge cluster or integrated body unit. IIRC only six wires need to be moved to convert an my05 harness to run from an my04 ECU. If you have a tuner nearby you could even use a Forester XT ECU with the only major difference being the gear determination thresholds having only five slots instead of six.