Egress Private Link Endpoint Setup: MongoDB Atlas on Azure for Confluent Cloud¶
This topic presents the steps for configuring the MongoDB Atlas Sink connector in Confluent Cloud with Azure Private Link and Egress Private Link Endpoint.
Prerequisites¶
The following is a list of prerequisites for configuring the MongoDB Altas connector with an Egress Private Link Endpoint:
- A Confluent Cloud Dedicated cluster was set up and is running within an Azure Private Link network.
- A Dedicated MongoDB Atlas database was created to sink data into and is running within the same region and cloud as the Confluent Cloud cluster.
- A source topic was created to sink data into MongoDB Atlas.
Step 1. Create a gateway in Confluent Cloud (for Enterprise cluster only)¶
If using an Enterprise cluster in Confluent Cloud, you must set up a gateway in Confluent Cloud as described in Create a gateway for outbound connectivity in Confluent Cloud.
Step 2. Create a MongoDB Private Endpoint¶
In MongoDB, create a Private Endpoint for for your Dedicated MongoDB Atlas database:
Go to Network Access → Private Endpoint → Dedicated Cluster.
Click Add Private Endpoint.
Select the applicable cloud provider and region of your Dedicated MongoDB Atlas database.
Make a note of the Atlas Endpoint Service value which is required for creating a Confluent Cloud Egress Private Link Endpoint.
You can close the workflow for now. You will edit the rest of the configuration after you create a VPC endpoint ID in Confluent Cloud.
Step 3. Create an Egress Private Link Endpoint¶
In the Network Management tab of the desired Confluent Cloud environment, click the Confluent Cloud network you want to add the Private Link Endpoint to. The Connection Type of the network needs to be “Private Link Access”.
Click Create endpoint in the Egress connections tab.
Click the service you want to connect to, specifically, MongoDB.
Follow the guided steps to specify the field values, including:
Name: The name of the Private Link Endpoint.
Resource ID: The resource ID/Endpoint Service value of the Private Link service you retrieved in Step 2.
Note that the resource alias is not supported.
Sub-resource name: The sub-resource name for the specific Azure service you retrieved in Obtain Azure Private Link Resource ID.
Click Create to create the Private Link Endpoint.
If there are additional steps for the specific target service, follow the prompt to complete the tasks, and then click Finish.
Once the status of the Egress Private Link Endpoint changes from “Provisioning” to “Pending”, make a note of the Resource ID and IP Address values. The values are required to finish setting up a private endpoint for MongoDB Atlas.
Step 4. Configure the MongoDB private endpoint¶
In the MongoDB console, click Edit for the previously created MongoDB private endpoint.
Click Next.
Specify the Endpoint Resource ID and Private Endpoint IP Address associated with your Confluent Cloud Egress Private Link Endpoint. Click Create.
Once Endpoint Status changes to “Available”, you are ready to create the Confluent Cloud MongoDB Sink connector.
Step 5. Create the MongoDB Atlas Sink connector¶
Specify the authentication details for MongoDB.
In the MongoDB Atlas console, click Database under Deployment.
Click Connect for the associated database.
Select the Private Endpoint connection type, and select the endpoint you created in Step 4.
Click Choose a connection method.
Select Shell in the Access your data through tools section.
Get the endpoint as shown.
In Confluent Cloud, specify the MongoDB credentials during the connector creation steps.
In the Connection host field, specify the endpoint you retrieved in the previous step.
Note
When you configure a private endpoint, ensure that the standard hostname matches the correct private link endpoint, for example “-pl-0” as shown in the screen below.
Follow the steps to create the source connector or the sink connector in Confluent Cloud.