What is this integration?
Azure Cosmos DB is a globally distributed, multi-model database service that supports NoSQL, MongoDB, and other APIs with guaranteed low latency at any scale.What Monk manages
- Database Account (with geo-replication, consistency policies, backup configuration)
- Database (with throughput provisioning)
- Access List (VNet service endpoints)
What the Agent can do and how to use it
- Account Management: Create and manage Cosmos DB accounts with multiple APIs (NoSQL, MongoDB)
- Global Distribution: Configure multi-region replication with automatic failover
- Consistency Levels: Set consistency from Strong to Eventual based on requirements
- Backup & Recovery: Configure continuous or periodic backup, point-in-time restore
- Throughput: Provision manual or autoscale throughput for databases
- Security: Configure VNet access rules, private endpoints, and authentication
- Ensure Azure credentials are configured (az login or service principal)
- monk update <namespace>/<name>
Auth
- Uses Azure credentials configured via:
- Azure CLI (
az login) - Service Principal (AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID)
- Managed Identity (when running on Azure)
- Azure CLI (
Getting Started
- Define a Cosmos DB account (save as cosmos.yaml):
- Create/update:
Multi-Region High Availability
For production workloads requiring global distribution:Backup & Restore Actions
| Action | Description |
|---|---|
get-backup-info | View backup policy and earliest restore time |
list-restorable-accounts | List accounts available for restore |
list-restorable-databases | List databases that can be restored |
list-restorable-containers | List containers that can be restored |
restore | Create a new account from point-in-time backup |

