Logging: get resource ids

- Added logging while fetching resource ids using Module references.
- Minor refactoring related to stream and forEach
- Fixed minor sonar violations

Issue-ID: CPS-1246
Change-Id: I631d7acd3f29e6bdc2995726e17f40bd7de118b1
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2 files changed