> This page is for Data Protection.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eon.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eon.io/_mcp/server.

# MongoDB Atlas: Connect Source Projects

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

[MongoDB Atlas: Permissions Deployment Files]: /data-protection/cloud-workloads/mongodb-atlas/permissions/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:

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:

   #### Bash

   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.

   [review the script]: https\://eon-public-b2b628cc-1d96-4fda-8dae-c3b1ad3ea03b.s3.amazonaws.com/mongo-atlas-eon-setup.sh

   #### Terraform

   1. Copy the Terraform module shown in the **main.tf** code panel into your Terraform configuration.
      You can [review the module] before you apply it.
      The Terraform provider authenticates with the `MONGODB_ATLAS_PUBLIC_KEY` and `MONGODB_ATLAS_PRIVATE_KEY` environment variables (or other [Atlas Terraform provider authentication methods]).

   2. Run `terraform apply`.

   3. After Terraform finishes, retrieve the Eon API key from the outputs:

      ```bash
      terraform output eon_public_key
      terraform output -raw eon_private_key
      ```

   [review the module]: https\://eon-public-b2b628cc-1d96-4fda-8dae-c3b1ad3ea03b.s3.amazonaws.com/mongo-atlas-eon-setup.zip[Atlas Terraform provider authentication methods]: https\://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/provider-configuration#authentication-methods

#### 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).

## 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].

[MongoDB Atlas: About Private Endpoints]: /data-protection/cloud-workloads/mongodb-atlas/private-endpoints/about-mongodb-atlas-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

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.

#### 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-`.

#### 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

* [MongoDB Atlas: Connect Source Organizations]
* [MongoDB Atlas: Configure Private Endpoints]
* [MongoDB Atlas: Permissions Deployment Files]
* [MongoDB Atlas: MongoDB Support]
* [About Source Accounts]

[MongoDB Atlas: Connect Source Organizations]: /data-protection/cloud-workloads/mongodb-atlas/source-projects/mongodb-atlas-connect-source-organizations

[MongoDB Atlas: Configure Private Endpoints]: /data-protection/cloud-workloads/mongodb-atlas/private-endpoints/mongodb-atlas-configure-private-endpoints

[MongoDB Atlas: MongoDB Support]: /data-protection/cloud-workloads/mongodb-atlas/resources/mongodb

[About Source Accounts]: /data-protection/backup-and-protection/backup-configuration/source-accounts/about-source-accounts