BAZYNGO-1412: factored out resource retrieval logic for reuse