We currently have an issue we are facing with our Azure Cosmos DB configuration, specifically connectivity to the Cosmos DB account through a private endpoint from an on-premises service that is hosted on a VM. Despite confirming successful network connectivity and IP resolution using telnet and nslookup, we encountered a barrier when the service tried to connect to the DB using an access key. We were able to get the connect to work, however we had to update the Cosmos DB account to allow the IP of the VM.
Here is a high-level overview of our current infrastructure configuration:
- Our Cosmos DB account is configured to disallow public access, and a private endpoint has been enabled.
- A peering connection has been established between the VNET containing the Private Endpoint and the Hub VNET. The Hub VNET has a connection to On-Premis set up.
- Our connection to the Cosmos DB is secured using an access key.
- We verified that we can telnet from the On-Premises VM's to the Private Endpoint IP on port 443
- We also verified that the URL for the DB is resolving to the Private Endpoint IP.
Here are a few questions I have:
- Do we have to allow this IP in the Cosmos DB networking rules, or would it be possible to have just the private endpoint set up?
- Is there an issue with the connection since we're trying to use an access key?
Please let me know if you have any questions and I look forward to your response.