documentdb-azure-deployment
Deploy an Azure DocumentDB cluster (`Microsoft.DocumentDB/mongoClusters`) end-to-end — Bicep (primary), Azure CLI one-shot, Terraform, or portal.
Skill by AzureOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/azure-documentdb-azure-deployment
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, devops, cloud
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/documentdb-azure-deployment
What's inside
- Skill name
documentdb-azure-deployment- Description
- Deploy an Azure DocumentDB cluster (`Microsoft.DocumentDB/mongoClusters`) end-to-end — Bicep (primary), Azure CLI one-shot, Terraform, or portal. Covers resource-group creation, cluster parameters (tier, storage, server version, sharding, HA), firewall rule configuration, retrieving the connection string, and teardown. Use when the user asks to provision, create, deploy, or spin up an Azure DocumentDB cluster, or wants infrastructure-as-code for one.
- License
- MIT
- Instructions
- 331 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- name: "documentdb-azure-deployment" does not match folder "azure-deployment"
- files: referenced but missing: examples/azure-deployment/deploy.sh
Files (3)
- SKILL.md
- bicep-cluster-template.md · references/
- terraform-cluster-template.md · references/
SKILL.md (first lines)
# Deploy Azure DocumentDB
Interactive skill for provisioning a managed **Azure DocumentDB** cluster (resource type `Microsoft.DocumentDB/mongoClusters`, API `2025-09-01`). Azure DocumentDB is the managed Azure service built on the open-source [`microsoft/documentdb`](https://github.com/microsoft/documentdb) engine.
For running DocumentDB locally instead (Docker / Compose), use `documentdb-local-deployment`. For connection-string tuning after the cluster exists, use `documentdb-connection`.
> **No-agent shortcut.** A ready-to-run Bicep + deploy script is checked in at [`examples/azure-deployment/`](../../examples/azure-deployment/) — customers who prefer to run the deploy themselves can clone the repo and just run `./deploy.sh` (no arguments). The script interactively lists subscriptions → resource groups → regions (same flow as this skill). Use it as a reference when generating project files too.
## Step 0 — preflight checks (run before anything else)
Run these checks at the start of every deployment session. If any fails, **fix it in place and re-run the loop** before continuing to Step 1 — don't skip ahead, and don't ask the user configuration questions you'll have to re-ask after they fix their environment.
```bash
# 1. Azure CLI installed?
az version --query '"azure-cli"' -o tsv
# → If 'az' is not found, stop and install: https://learn.microsoft.com/cli/azure/install-azure-cli
# 2. Signed in?
az account show --query '{name:name, id:id}' -o json
# → On failure, run: az login
# 3. Correct subscription active?
az account show --query name -o tsv
# → If wrong, run: az account set --subscription "<name-or-id>"
# 4. Microsoft.DocumentDB provider registered on the subscription?
az provider show --namespace Microsoft.DocumentDB --query registrationState -o tsv
# → If 'NotRegistered' or 'Unregistered', run:
# az provider register --namespace Microsoft.DocumentDB
# Then poll until state is 'Registered' (~1–2 min).
# 5. Caller has Contributor/Owner on the target scope?
az role assignment list --assignee "$(az ad signed-in-user show --query id -o tsv)" \
--scope "/subscriptions/$(az account show --query id -o tsv)" \
--query "[].roleDefinitionName" -o tsv
# → Expect Contributor, Owner, or a custom role with Microsoft.DocumentDB/mongoClusters/write.
# If empty or only a reader role, escalate before proceeding.
# 6. Region supports mongoClusters?
az provider show --namespace Microsoft.DocumentDB \
--query "resourceTypes[?resourceType=='mongoClusters'].locations[]" -o tsv
# → Confirm the user's chosen location is in the list.
```
`examples/azure-deployment/deploy.sh` and `deploy.ps1` implement checks 1–4 automatically and will `az login` / register the provider / create the resource group as needed. If you're generating deployment files into a user's project, copy those scripts or use them as a template.
## Step 0.5 — is this production or dev/test?
Ask the user **before** anything else in Step 1. The answer drives every default. Never assume.
| If "production" (default) | If "dev / prototype / test" |
|---|---|
| Tier: **M30** (minimum that supports HA) | Tier: **M10** or M20 |
| Storage: **128 GiB** per shard | Storage: **32 GiB** |
| HA: **ZoneRedundantPreferred** | HA: **Disabled** |
| Firewall: Private Endpoint; `allowAzureServices: false` | `allowAzureServices: true` + developer IP rule |
| Password source: **Key Vault reference** | Key Vault preferred; literal OK for throwaway |
| Parameters file: `main.parameters.sample.json` | `main.parameters.dev.json` |
Production is the safer default — the Bicep template and `main.parameters.sample.json` in `examples/azure-deployment/` ship with M30 + ZoneRedundantPreferred + 128 GiB so that a customer who runs `./deploy.sh <rg> <location>` without overrides ends up with a cluster they can actually put workloads on. If the user answers "dev", either:
- pass `--parameters @main.parameters.dev.json` to the deploy script, **or**
- override on the command line:
```bash
az deployment group create \
--resource-group "<rg>" \
--template-file main.bicep \
--parameters computeTier=M10 storageSizeGb=32 haTargetMode=Disabled
```
## Step 1 — pick the Azure subscription (always ask, never assume)
The currently active subscription from `az account show` may not be the one the user wants. Always list and confirm — never silently use the active one.
```bash
# Show all subscriptions the signed-in user can access
az account list --query "[].{Name:name, SubscriptionId:id, State:state, IsDefault:isDefault}" \
--output table
```
Present the list to the user and ask them to pick one (by name or ID). Then set it active so subsequent commands are scoped to it:
```bash
az account set --subscription "<subscription-id-or-name>"
az account show --query "{name:name, id:id}" -o table # confirm
```
Record the chosen subscription ID as `$SUBSCRIPTION_ID` and pass `--subscription "$SUBSCRIPTION_ID"` to every subsequent `az` command in this flow — this guarantees RG / region lookups stay scoped to the user's choice even if the active context drifts.
If the user has only one subscription, still confirm out loud ("I'll deploy into `<name>` — OK?") rather than silently proceeding.
## Step 2 — pick the resource group in that subscription (existing or new)
List the resource groups **scoped to the chosen subscription** (do not omit `--subscription` — it prevents showing RGs from a different context):
```bash
az group list \
--subscription "$SUBSCRIPTION_ID" \
--query "[].{Name:name, Location:location}" \
--output table
```
Present the list to the user and ask them to pick **one of**:
**(a) Reuse an existing RG** — take its `location` from the table above and use that as the cluster's region by default. **Skip Step 3** (the region is already fixed by the RG). Record it as `$LOCATION`.
**(b) Create a new RG** — ask the user for the new RG name, then continue to Step 3 to pick a region before creating it.
Do not proceed to Step 3 or Step 4 until the user has explicitly picked (a) or (b).
## Step 3 — pick the Azure region (only when creating a new RG)
Reached only when the user chose 2(b). List the regions that support `Microsoft.DocumentDB/mongoClusters` so the user can pick one that is both regionally appropriate and supported:
```bash
az provider show \
--subscription "$SUBSCRIPTION_ID" \
--namespace Microsoft.DocumentDB \
--query "resourceTypes[?resourceType=='mongoClusters'].locations[]" \From Azure/documentdb-agent-kit, MIT.
More from Azure/documentdb-agent-kit
- 0.670score
documentdb-query-optimizer
AzureOfficial
Help with DocumentDB/MongoDB query optimization and indexing for Azure DocumentDB.
SkillBFreshness: B★ 6Claude Code +9 - 0.660score
documentdb-data-modeling
AzureOfficial
Data modeling patterns for Azure DocumentDB — embed vs reference, 16 MB document limit, denormalization for read-heavy workloads, schema versioning.
SkillBFreshness: B★ 6Claude Code +9 - 0.607score
documentdb-high-availability
AzureOfficial
High availability, business-continuity, and disaster-recovery best practices for Azure DocumentDB — enabling in-region HA with availability zones (99.99%…
SkillCFreshness: C★ 6Claude Code +9 - 0.607score
documentdb-indexing
AzureOfficial
Index-type selection and shape guidance for Azure DocumentDB — when to use single-field, compound (ESR), multikey, wildcard, hashed, 2dsphere, TTL, and vector…
SkillCFreshness: C★ 6Claude Code +9 - 0.607score
documentdb-connection
AzureOfficial
Optimize MongoDB client connection configuration (pools, timeouts, patterns) for Azure DocumentDB.
SkillCFreshness: C★ 6Claude Code +9 - 0.607score
documentdb-full-text-search
AzureOfficial
Full-text search best practices for Azure DocumentDB using the `createSearchIndexes` command and `$search` aggregation stage — BM25 keyword scoring, fuzzy…
SkillCFreshness: C★ 6Claude Code +9 - 0.607score
documentdb-mcp-setup
AzureOfficial
Guide users through installing and configuring the DocumentDB MCP server for Azure DocumentDB.
SkillCFreshness: C★ 6Claude Code +9 - 0.607score
documentdb-natural-language-querying
AzureOfficial
Generate read-only DocumentDB/MongoDB queries (find) or aggregation pipelines using natural language, with collection schema context and sample documents.
SkillCFreshness: C★ 6Claude Code +9 - 0.607score
documentdb-sharding
AzureOfficial
Horizontal sharding (partitioning) for Azure DocumentDB collections — when to shard vs stay single-shard, how to pick a shard key for read-heavy vs…
SkillCFreshness: C★ 6Claude Code +9 - 0.607score
documentdb-storage
AzureOfficial
Storage configuration guidance for Azure DocumentDB — when and how to use Premium SSD v2 high-performance storage, IOPS/bandwidth caps that are gated by…
SkillCFreshness: C★ 6Claude Code +9 - 0.607score
documentdb-vector-search
AzureOfficial
Vector search best practices for Azure DocumentDB using `cosmosSearch` — choosing between DiskANN / HNSW / IVF, creating indexes, tuning `lBuild` / `lSearch`…
SkillCFreshness: C★ 6Claude Code +9 - 0.601score
documentdb-local-deployment
AzureOfficial
Best practices for running Azure DocumentDB locally for development — choosing between the Gateway Docker image and the psql-only image, docker-compose setup…
SkillCFreshness: C★ 6Claude Code +9
Signals
- Stars
- 6
- Forks
- 12
- Open issues
- 5
- Last commit (this folder)
- May 8, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Azure/documentdb-agent-kit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from Azure
- 0.670score
documentdb-query-optimizer
AzureOfficial
Help with DocumentDB/MongoDB query optimization and indexing for Azure DocumentDB.
SkillBFreshness: B★ 6Claude Code +9 - 0.660score
documentdb-data-modeling
AzureOfficial
Data modeling patterns for Azure DocumentDB — embed vs reference, 16 MB document limit, denormalization for read-heavy workloads, schema versioning.
SkillBFreshness: B★ 6Claude Code +9 - 0.607score
documentdb-high-availability
AzureOfficial
High availability, business-continuity, and disaster-recovery best practices for Azure DocumentDB — enabling in-region HA with availability zones (99.99%…
SkillCFreshness: C★ 6Claude Code +9 - 0.607score
documentdb-full-text-search
AzureOfficial
Full-text search best practices for Azure DocumentDB using the `createSearchIndexes` command and `$search` aggregation stage — BM25 keyword scoring, fuzzy…
SkillCFreshness: C★ 6Claude Code +9 - 0.607score
documentdb-connection
AzureOfficial
Optimize MongoDB client connection configuration (pools, timeouts, patterns) for Azure DocumentDB.
SkillCFreshness: C★ 6Claude Code +9 - 0.607score
documentdb-indexing
AzureOfficial
Index-type selection and shape guidance for Azure DocumentDB — when to use single-field, compound (ESR), multikey, wildcard, hashed, 2dsphere, TTL, and vector…
SkillCFreshness: C★ 6Claude Code +9
Cite this page
documentdb-azure-deployment skill. Agent Mart. https://agentmart.dev/skills/azure-documentdb-azure-deployment (last updated 2026-10-24)