Azure / Azure/Azure-Verified-Modules
[Module Proposal]: `avm/ptn/app/mongodb-cluster-container-app`
- Dominant language
- PowerShell
- Stars
- 580
- Forks
- 161
- Avg merge
- 11h 3m
- Merged PRs (30d)
- 15
Description
### Check for previous/existing GitHub issues/module proposals
- [x] I have checked for previous/existing GitHub issues/module proposals.
### Check this module doesn't already exist in the module indexes
- [x] I have checked for that this module doesn't already exist in the module indexes.
### Bicep or Terraform?
Bicep
### Module Classification?
Pattern Module
### Module Name
`avm/ptn/app/mongodb-cluster-container-app`
### Module Details
I'm the content developer for Azure Cosmos DB documentation and I have a series of Azure Cosmos DB for MongoDB (vCore) Quickstarts that are published as Azure Developer CLI templates. Here's a list of the current ones:
| | API | Framework/Language | Documentation |
| --- | --- | --- | --- |
| [`azure-samples/cosmos-db-mongodb-vcore-dotnet-quickstart`](https://github.com/azure-samples/cosmos-db-mongodb-vcore-dotnet-quickstart) | MongoDB (vCore) | .NET/C# | [`/azure/cosmos-db/mongodb/vcore/quickstart-dotnet`](https://learn.microsoft.com/azure/cosmos-db/mongodb/vcore/quickstart-dotnet) |
| [`azure-samples/cosmos-db-mongodb-vcore-nodejs-quickstart`](https://github.com/azure-samples/cosmos-db-mongodb-vcore-nodejs-quickstart) | MongoDB (vCore) | Node.js/JavaScript/TypeScript | [`/azure/cosmos-db/mongodb/vcore/quickstart-nodejs`](https://learn.microsoft.com/azure/cosmos-db/mongodb/vcore/quickstart-nodejs) |
| [`azure-samples/cosmos-db-mongodb-vcore-python-quickstart`](https://github.com/azure-samples/cosmos-db-mongodb-vcore-python-quickstart) | MongoDB (vCore) | Python | [`/azure/cosmos-db/mongodb/vcore/quickstart-python`](https://learn.microsoft.com/azure/cosmos-db/mongodb/vcore/quickstart-python) |
Today, I need to maintain an Azure Bicep infrastructure definition that defines a solution that hosts an Azure Container Registry, Azure Container App, and Azure Cosmos DB for MongoDB (vCore) account and duplicate it across all of these AZD templates. Microsoft Entra authentication is configured end-to-end in my existing templates.
The problem today is that anytime I discover an efficiency, I'm disuaded from updating all of the templates because of the sheer complexity. I'm also onboarding three more languages soon for this sample set.
I want to define a pattern that has the following components:
- An Azure Container Apps environment and instance to host our n-tier web application
- An Azure Container Registry to host container images from the web application
- An Azure Cosmos DB account
- An user-assigned managed identity
- The correct Microsoft Entra authentication and Azure Cosmos DB for MongoDB (vCore) native roles to correct directly to the account
I'm prepared to build and own this myself. I can also recruit someone from the product group as a co-owner.
My goal is to make the pattern flexible enough that someone can use it for their own best-practices deployment no matter how many tiers their web application has definied.
> [!NOTE]
> I'm labeling this `mongodb-cluster-container-app` to make it distinct from my other proposal for a similar pattern (`cosmos-db-account-container-app`) for the other Azure Cosmos DB APIs. Azure Cosmos DB for MongoDB (vCore) uses a different resource provider.
- Related to #2075
### Do you want to be the owner of this module?
Yes
### Module Owner's GitHub Username (handle)
seesharprun
### (Optional) Secondary Module Owner's GitHub Username (handle)
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the existing Azure Developer CLI quickstart templates linked in the proposal and the related issue #2075. Define the proposed avm/ptn/app/mongodb-cluster-container-app pattern around the listed Container Apps, Container Registry, Cosmos DB, managed identity, and Microsoft Entra requirements. Done means a reusable pattern that supports the described multi-tier deployments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, mongodb
- Domain
- cloud, databases, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100