Hi, the A3 8p 04-12 has the luggage/boot light is controlled through the comfort control module ( located on the right side rear trim of the boot.
I is likely signalled by the CAN-BUS when the boot is open,I will attach a wiring diagram . it could be a broken wire in the harness joining the boot lid to the car (as mentioned by Gareth ) but before opening all the loom, first find the correct wire at the comfort module and do a continuity test to the light . W3 is the boot light.
I know the question is old ,but I am trying to solve the same fault, and will update ,if or when i solve mine.
Phil