Jump to main content
Step 1: Create an Azure Cosmos DB for
MongoDB vCore Cluster
- Sign in to the Azure Portal:
- Go to
Azure Portal
.
- Search for Azure Cosmos DB in the search bar.
- Create a New Cosmos DB Cluster:
- Click Create a resource → Search for Azure Cosmos DB.
- On the Which API best suits your workload? page, select Azure Cosmos DB for
MongoDB.
- On the next page, select Create under the vCore cluster section.
- Configure the Cluster:
- Click Configure under Cluster tier, then set:
- Shard Count: Single Shard
- Cluster Tier: M30 (2 vCores, 8 GB RAM)
- Storage per Shard: 128 GB
- Enable High Availability if this is a production setup.
- Click Save to apply changes.
- Enter Cluster Details:
- Subscription: Select your Azure subscription.
- Resource Group: Select an existing one or create a new one.
- Cluster Name: Enter a unique name (e.g., GenAI-mongo-cluster).
- Location: Choose a region close to your application.
- MongoDB Version: Select the required version.
- Admin Username & Password: Provide credentials for the cluster.
- Networking Configuration:
- Choose one of the following options based on your security requirements:
- Recommended (Restricted Access):
- Add a firewall rule to allow access only from your local machine or specific
IP ranges.
- For Initial Testing (Less Secure):
- Allow all IPs temporarily by setting the firewall rule to 0.0.0.0 -
255.255.255.255.
- This is useful for quick setup but should be restricted once connectivity is
verified.
- Additionally, select Allow public access from Azure services to enable Azure-based
applications to connect.
- Review & Deploy:
- Click Review + Create, then Create.
- Wait for the deployment to complete, then select Go to resource.