Recently I came up with a few templates for setting up Cosmos DB Infrastructure for a demonstration. Following steps will show how to setup the Cosmos DB, Create Collections, Create Private DNS Zones and Setup a Custom SQL role.
The complete example is available publicly on GitHub.
https://github.com/Malind19/springdata-infrastructure/blob/main/modules/cosmos.bicep