Preheat oven200C/180C fan/gas 6. In a frying pan over a medium heat, melt the butter. Add the shallots and fry for 3 - 4 minutes until they begin to soften. Add the garlic, rosemary and a pinch of salt and fry for a further minute. Spoon out of the pan and allow to slightly cool.
Place the echalion shallots cut-side down in the pan and fry for 2 - 3 minutes until they start to caramelize and char - set aside.
Roll out the sheet of puff pastry and place on a lined baking tray. Using a knife, score a 2cmboarder before evenly spreading on the roule keeping within the lines. Top the roule with the cooked shallots and rosemary mixture before adding the apple slices, shallot halves and dotting over the brie.
Break the egg into a small bowl and lightly whisk. Using a pastry brush, brush the boarder with a little egg wash before placing in the oven for 15 - 20 minutes. In the last 5minutes of cooking, sprinkle over the walnuts and return to oven.
Once the pastry is puffed, golden and the brie has melted, remove from the oven and place on a serving board. Sprinkle over some fresh thyme leaves and slice into portions.