You can only attach your Database Instance to one Private Network at a time.
How to connect an existing MongoDB® Database Instance to a Private Network
Private Networks allows you to enhance the security of your system’s architecture by isolating it from the internet.
Using Private Networks improves performance by reducing the latency between your application and your database nodes. It also increases the security of your databases, as Instances in your Private Network can directly communicate with your Database Instance, without passing through the public internet.
You can create new Database Instances to attach to your Private Network, or attach existing ones.
Before you startLink to this anchor
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- A valid API key
- A Managed MongoDB® Database Instance
How to attach a Database Instance to a Private NetworkLink to this anchor
- Click MongoDB® under Managed Databases on the side menu. A list of your Database Instances displays.
- Click the database name or «See more Icon», then click More info to access the Database Instance information page.
- Scroll to the Network section.
- Click Attach Private Network next to Private endpoint. A pop-up appears.
- Choose one or both of the options below:
- Select and attach an existing Private Network and select the network from the drop-down list.
Important
The Database Instance must be attached to a Private Network in the same region.
- Create and attach a new Private Network and enter the name of the network in the form.
Important
If you select this option, a Private Network with default settings will be created in the same region as your Database Instance. Do not use a TLD (e.g.
dev
orcloud
) as a name, to avoid conflicts.
- Select and attach an existing Private Network and select the network from the drop-down list.
- Click Attach to Private Network to conclude.
Managed MongoDB® is currently not compatible with the Static NAT feature of Scaleway Public Gateways. You can use Public Gateways in SSH bastion mode and perform port forwarding.
Once you have attached your Database Instance to a Private Network, you can connect to the Database Instance using the private endpoint connection string.
How to detach a Database Instance from a Private NetworkLink to this anchor
- Click MongoDB® under Managed Databases on the side menu. A list of your Database Instances displays.
- Click the database name or «See more Icon», then click More info to access the Database Instance information page.
- Scroll to the Network section.
- Click Detach Private Network. A pop-up appears.
- Click Detach resource to confirm.
This action takes a few moments to complete. During this time, your Database Instance:
- remains available,
- goes into Configuring mode, and
- network configuration actions become unavailable