Hello Hernando and thanks for your answer...
So if I take your example, I create the resources 1,2,3 in module A (app-services.ts) and export them there and in module B (key-vault.ts) I import the resources from module A. I can also access the resources from module A in module B, and for example I can also read the outputs from the resources 1,2,3 im module B.
However, the dependencies I configured via "dependsOn" are not taken into account, that means the build order is not as I configured it via "dependsOn".
If I now simply copy the code from module A into module B, then the build order works as configured in "dependsOn".
I have therefore now placed the code for all resources in a single ts module - a bad solution that I actually did not want to have in this form.