MongoDB Atlas: Connect Source Projects
Who can use this feature
Anyone with these permissions: Manage source connections
This article explains how to connect a MongoDB Atlas project to Eon as a source project. You can connect as many Atlas projects as you need.
Connect a source project
Start this procedure on the Source Accounts > MongoDB Atlas projects page in the Eon console. Click New Connection and select Connect project. The Connect source project wizard opens.
Before you start
Before you connect a MongoDB Atlas project, make sure:
-
You can sign in to the MongoDB Atlas project as a user with permission to create database users and project-level API keys.
-
You understand the permissions Eon installs in the Atlas project. See MongoDB Atlas: Permissions Deployment Files.
Get the MongoDB Atlas Project ID
In the MongoDB Atlas console, open the project you want to connect and copy its Project ID from the project settings.
Run the setup
In the Run the setup section of the Eon wizard:
-
Choose Terraform or Bash with the deployment toggle.
-
Enter your Atlas Project ID into the Project ID field. The wizard generates the deployment code for you.
-
Run the generated code in your environment:
Bash
Terraform
-
Copy the command shown in the mongo-atlas-eon-setup.sh code panel and run it in a terminal. The command downloads and runs the setup script, which provisions an Atlas database user (with the
readAnyDatabaserole) and a project-level Atlas API key (with theGROUP_READ_ONLYrole) for Eon. You can review the script before you run it. -
Follow the script’s prompts to authorize the script with MongoDB Atlas. The script uses Atlas device-authorization OAuth: it displays a verification code and a URL, you open the URL in a browser, paste the code, and confirm.
-
After the script finishes, copy the Eon API Public Key and Eon API Private Key values it prints.
-
Eon validates the Atlas configuration and, on success, adds the project to the MongoDB Atlas projects list. Eon can now discover clusters in the project.
To keep traffic between Eon and this project on the AWS private network, configure a private endpoint.
Configure a private endpoint
You can configure an AWS private endpoint so traffic between Eon and this Atlas project stays on the AWS private network. For a source project, Eon provisions and manages the VPC interface endpoint in Eon’s own scanning account. You don’t create the endpoint in Atlas yourself. Instead, you register the endpoint that Eon provisions. For background, see MongoDB Atlas: About Private Endpoints.
Before you start, make sure:
-
Your Atlas cluster is a dedicated cluster (M10 or higher). Private endpoints aren’t available on Free or Flex clusters.
-
You have Project Owner or Organization Owner access in the MongoDB Atlas project.
-
Your cluster is in an AWS region where you plan to configure the private endpoint. Private endpoints are region-specific.
Create the endpoint service in MongoDB Atlas
-
In the MongoDB Atlas console, go to the Database & Network Access page, then click Private Endpoint in the sidebar.
-
Select the Dedicated Cluster tab and click Create Endpoint Service.
-
Choose AWS as the cloud provider.
-
From the Atlas Region list, select the primary region where your cluster is deployed.
-
Click Create Endpoint Service. Endpoint service creation takes a few minutes.
-
Copy the Service Name displayed for the endpoint service. You’ll paste it into Eon in the next step.
Create the private endpoint in Eon
-
In the Eon console, go to Source Accounts → MongoDB Atlas projects and open the project you’re connecting.
-
Expand the Private Links section and open the actions menu.
-
Select Set up PrivateLink.
-
Paste the Service Name you copied from Atlas and click Create PrivateLink. Eon creates the matching VPC endpoint.
-
Copy the VPC Endpoint ID that Eon displays. It begins with
vpce-.
Register the endpoint in Atlas and verify
-
In the MongoDB Atlas console, return to the Database & Network Access page and open your endpoint service.
-
Click Add Endpoint, then select Connect Existing Endpoint.
-
Enter the VPC Endpoint ID you copied from Eon, then click Submit Endpoint.
-
Wait for Atlas to show Available.
-
In Eon, click Verify connection. Eon confirms that the PrivateLink connection is available.
Once verification succeeds, all Eon backup traffic to the Atlas project flows over AWS PrivateLink on the private network.