Skip to navigation

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.

1

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.

2

Run the setup

In the Run the setup section of the Eon wizard:

  1. Choose Terraform or Bash with the deployment toggle.

  2. Enter your Atlas Project ID into the Project ID field. The wizard generates the deployment code for you.

  3. Run the generated code in your environment:

    1. 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 readAnyDatabase role) and a project-level Atlas API key (with the GROUP_READ_ONLY role) for Eon. You can review the script before you run it.

    2. 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.

    3. After the script finishes, copy the Eon API Public Key and Eon API Private Key values it prints.

3

Complete configuration

In the Complete configuration section of the Eon wizard:

  1. Paste the values from the previous step into the Eon API Public Key and Eon API Private Key fields.

  2. Click Connect.

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.

1

Create the endpoint service in MongoDB Atlas

  1. In the MongoDB Atlas console, go to the Database & Network Access page, then click Private Endpoint in the sidebar.

  2. Select the Dedicated Cluster tab and click Create Endpoint Service.

  3. Choose AWS as the cloud provider.

  4. From the Atlas Region list, select the primary region where your cluster is deployed.

  5. Click Create Endpoint Service. Endpoint service creation takes a few minutes.

  6. Copy the Service Name displayed for the endpoint service. You’ll paste it into Eon in the next step.

2

Create the private endpoint in Eon

  1. In the Eon console, go to Source Accounts → MongoDB Atlas projects and open the project you’re connecting.

  2. Expand the Private Links section and open the actions menu.

  3. Select Set up PrivateLink.

  4. Paste the Service Name you copied from Atlas and click Create PrivateLink. Eon creates the matching VPC endpoint.

  5. Copy the VPC Endpoint ID that Eon displays. It begins with vpce-.

3

Register the endpoint in Atlas and verify

  1. In the MongoDB Atlas console, return to the Database & Network Access page and open your endpoint service.

  2. Click Add Endpoint, then select Connect Existing Endpoint.

  3. Enter the VPC Endpoint ID you copied from Eon, then click Submit Endpoint.

  4. Wait for Atlas to show Available.

  5. 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.

See also