Share via


Microsoft.DocumentDB mongoClusters

Bicep resource definition

The mongoClusters resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DocumentDB/mongoClusters resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.DocumentDB/mongoClusters@2025-07-01-preview' = {
  identity: {
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {}
    }
  }
  location: 'string'
  name: 'string'
  properties: {
    administrator: {
      password: 'string'
      userName: 'string'
    }
    authConfig: {
      allowedModes: [
        'string'
      ]
    }
    backup: {}
    compute: {
      tier: 'string'
    }
    createMode: 'string'
    dataApi: {
      mode: 'string'
    }
    encryption: {
      customerManagedKeyEncryption: {
        keyEncryptionKeyIdentity: {
          identityType: 'string'
          userAssignedIdentityResourceId: 'string'
        }
        keyEncryptionKeyUrl: 'string'
      }
    }
    highAvailability: {
      targetMode: 'string'
    }
    previewFeatures: [
      'string'
    ]
    publicNetworkAccess: 'string'
    replicaParameters: {
      sourceLocation: 'string'
      sourceResourceId: 'string'
    }
    restoreParameters: {
      pointInTimeUTC: 'string'
      sourceResourceId: 'string'
    }
    serverVersion: 'string'
    sharding: {
      shardCount: int
    }
    storage: {
      iops: int
      sizeGb: int
      throughput: int
      type: 'string'
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

Property Values

Microsoft.DocumentDB/mongoClusters

Name Description Value
identity The managed service identities assigned to this resource. ManagedServiceIdentity
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Min length = 3
Max length = 40
Pattern = ^[a-z0-9]+(-[a-z0-9]+)* (required)
properties The resource-specific properties for this resource. MongoClusterProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates

AdministratorProperties

Name Description Value
password The administrator password. string

Constraints:
Sensitive value. Pass in as a secure parameter.
userName The administrator user name. string

AuthConfigProperties

Name Description Value
allowedModes Allowed authentication modes for data access on the cluster. String array containing any of:
'MicrosoftEntraID'
'NativeAuth'

BackupProperties

Name Description Value

ComputeProperties

Name Description Value
tier The compute tier to assign to the cluster, where each tier maps to a virtual-core and memory size. Example values: 'M30', 'M40'. string

CustomerManagedKeyEncryptionProperties

Name Description Value
keyEncryptionKeyIdentity The identity used to access the key encryption key. KeyEncryptionKeyIdentity (required)
keyEncryptionKeyUrl The URI of the key vault key used for encryption. string (required)

DataApiProperties

Name Description Value
mode The mode to indicate whether the Mongo Data API is enabled for a cluster. 'Disabled'
'Enabled'

EncryptionProperties

Name Description Value
customerManagedKeyEncryption Customer managed key encryption settings. CustomerManagedKeyEncryptionProperties

HighAvailabilityProperties

Name Description Value
targetMode The target high availability mode requested for the cluster. 'Disabled'
'SameZone'
'ZoneRedundantPreferred'

KeyEncryptionKeyIdentity

Name Description Value
identityType The type of identity. Only 'UserAssignedIdentity' is supported. 'UserAssignedIdentity' (required)
userAssignedIdentityResourceId The user assigned identity resource id. string (required)

ManagedServiceIdentity

Name Description Value
type Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). 'None'
'SystemAssigned'
'SystemAssigned,UserAssigned'
'UserAssigned' (required)
userAssignedIdentities The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. UserAssignedIdentities

MongoClusterProperties

Name Description Value
administrator The local administrator properties for the mongo cluster. AdministratorProperties
authConfig The authentication configuration for the cluster. AuthConfigProperties
backup The backup properties of the mongo cluster. BackupProperties
compute The compute properties of the mongo cluster. ComputeProperties
createMode The mode to create a mongo cluster. 'Default'
'GeoReplica'
'PointInTimeRestore'
'Replica'
dataApi The Data API properties of the mongo cluster. DataApiProperties
encryption The encryption configuration for the cluster. Depends on identity being configured. EncryptionProperties
highAvailability The high availability properties of the mongo cluster. HighAvailabilityProperties
previewFeatures List of private endpoint connections. String array containing any of:
'GeoReplicas'
publicNetworkAccess Whether or not public endpoint access is allowed for this mongo cluster. 'Disabled'
'Enabled'
replicaParameters The parameters to create a replica mongo cluster. MongoClusterReplicaParameters
restoreParameters The parameters to create a point-in-time restore mongo cluster. MongoClusterRestoreParameters
serverVersion The Mongo DB server version. Defaults to the latest available version if not specified. string
sharding The sharding properties of the mongo cluster. ShardingProperties
storage The storage properties of the mongo cluster. StorageProperties

MongoClusterReplicaParameters

Name Description Value
sourceLocation The location of the source cluster string (required)
sourceResourceId The id of the replication source cluster. string (required)

MongoClusterRestoreParameters

Name Description Value
pointInTimeUTC UTC point in time to restore a mongo cluster string
sourceResourceId Resource ID to locate the source cluster to restore string

ShardingProperties

Name Description Value
shardCount Number of shards to provision on the cluster. int

StorageProperties

Name Description Value
iops The IOPs of the storage assigned to each server. Only applicable if the type is 'PremiumSSDv2'. int
sizeGb The size of the data disk assigned to each server. int
throughput The throughput of the storage assigned to each server. Only applicable if the type is 'PremiumSSDv2'. int
type The type of storage to provision the cluster servers with. 'PremiumSSD'
'PremiumSSDv2'

TrackedResourceTags

Name Description Value

UserAssignedIdentities

Name Description Value

UserAssignedIdentity

Name Description Value

Usage Examples

Azure Verified Modules

The following Azure Verified Modules can be used to deploy this resource type.

Module Description
Cosmos DB for MongoDB (vCore) AVM Resource Module for Cosmos DB for MongoDB (vCore)

ARM template resource definition

The mongoClusters resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DocumentDB/mongoClusters resource, add the following JSON to your template.

{
  "type": "Microsoft.DocumentDB/mongoClusters",
  "apiVersion": "2025-07-01-preview",
  "name": "string",
  "identity": {
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {
      }
    }
  },
  "location": "string",
  "properties": {
    "administrator": {
      "password": "string",
      "userName": "string"
    },
    "authConfig": {
      "allowedModes": [ "string" ]
    },
    "backup": {
    },
    "compute": {
      "tier": "string"
    },
    "createMode": "string",
    "dataApi": {
      "mode": "string"
    },
    "encryption": {
      "customerManagedKeyEncryption": {
        "keyEncryptionKeyIdentity": {
          "identityType": "string",
          "userAssignedIdentityResourceId": "string"
        },
        "keyEncryptionKeyUrl": "string"
      }
    },
    "highAvailability": {
      "targetMode": "string"
    },
    "previewFeatures": [ "string" ],
    "publicNetworkAccess": "string",
    "replicaParameters": {
      "sourceLocation": "string",
      "sourceResourceId": "string"
    },
    "restoreParameters": {
      "pointInTimeUTC": "string",
      "sourceResourceId": "string"
    },
    "serverVersion": "string",
    "sharding": {
      "shardCount": "int"
    },
    "storage": {
      "iops": "int",
      "sizeGb": "int",
      "throughput": "int",
      "type": "string"
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

Property Values

Microsoft.DocumentDB/mongoClusters

Name Description Value
apiVersion The api version '2025-07-01-preview'
identity The managed service identities assigned to this resource. ManagedServiceIdentity
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Min length = 3
Max length = 40
Pattern = ^[a-z0-9]+(-[a-z0-9]+)* (required)
properties The resource-specific properties for this resource. MongoClusterProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates
type The resource type 'Microsoft.DocumentDB/mongoClusters'

AdministratorProperties

Name Description Value
password The administrator password. string

Constraints:
Sensitive value. Pass in as a secure parameter.
userName The administrator user name. string

AuthConfigProperties

Name Description Value
allowedModes Allowed authentication modes for data access on the cluster. String array containing any of:
'MicrosoftEntraID'
'NativeAuth'

BackupProperties

Name Description Value

ComputeProperties

Name Description Value
tier The compute tier to assign to the cluster, where each tier maps to a virtual-core and memory size. Example values: 'M30', 'M40'. string

CustomerManagedKeyEncryptionProperties

Name Description Value
keyEncryptionKeyIdentity The identity used to access the key encryption key. KeyEncryptionKeyIdentity (required)
keyEncryptionKeyUrl The URI of the key vault key used for encryption. string (required)

DataApiProperties

Name Description Value
mode The mode to indicate whether the Mongo Data API is enabled for a cluster. 'Disabled'
'Enabled'

EncryptionProperties

Name Description Value
customerManagedKeyEncryption Customer managed key encryption settings. CustomerManagedKeyEncryptionProperties

HighAvailabilityProperties

Name Description Value
targetMode The target high availability mode requested for the cluster. 'Disabled'
'SameZone'
'ZoneRedundantPreferred'

KeyEncryptionKeyIdentity

Name Description Value
identityType The type of identity. Only 'UserAssignedIdentity' is supported. 'UserAssignedIdentity' (required)
userAssignedIdentityResourceId The user assigned identity resource id. string (required)

ManagedServiceIdentity

Name Description Value
type Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). 'None'
'SystemAssigned'
'SystemAssigned,UserAssigned'
'UserAssigned' (required)
userAssignedIdentities The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. UserAssignedIdentities

MongoClusterProperties

Name Description Value
administrator The local administrator properties for the mongo cluster. AdministratorProperties
authConfig The authentication configuration for the cluster. AuthConfigProperties
backup The backup properties of the mongo cluster. BackupProperties
compute The compute properties of the mongo cluster. ComputeProperties
createMode The mode to create a mongo cluster. 'Default'
'GeoReplica'
'PointInTimeRestore'
'Replica'
dataApi The Data API properties of the mongo cluster. DataApiProperties
encryption The encryption configuration for the cluster. Depends on identity being configured. EncryptionProperties
highAvailability The high availability properties of the mongo cluster. HighAvailabilityProperties
previewFeatures List of private endpoint connections. String array containing any of:
'GeoReplicas'
publicNetworkAccess Whether or not public endpoint access is allowed for this mongo cluster. 'Disabled'
'Enabled'
replicaParameters The parameters to create a replica mongo cluster. MongoClusterReplicaParameters
restoreParameters The parameters to create a point-in-time restore mongo cluster. MongoClusterRestoreParameters
serverVersion The Mongo DB server version. Defaults to the latest available version if not specified. string
sharding The sharding properties of the mongo cluster. ShardingProperties
storage The storage properties of the mongo cluster. StorageProperties

MongoClusterReplicaParameters

Name Description Value
sourceLocation The location of the source cluster string (required)
sourceResourceId The id of the replication source cluster. string (required)

MongoClusterRestoreParameters

Name Description Value
pointInTimeUTC UTC point in time to restore a mongo cluster string
sourceResourceId Resource ID to locate the source cluster to restore string

ShardingProperties

Name Description Value
shardCount Number of shards to provision on the cluster. int

StorageProperties

Name Description Value
iops The IOPs of the storage assigned to each server. Only applicable if the type is 'PremiumSSDv2'. int
sizeGb The size of the data disk assigned to each server. int
throughput The throughput of the storage assigned to each server. Only applicable if the type is 'PremiumSSDv2'. int
type The type of storage to provision the cluster servers with. 'PremiumSSD'
'PremiumSSDv2'

TrackedResourceTags

Name Description Value

UserAssignedIdentities

Name Description Value

UserAssignedIdentity

Name Description Value

Usage Examples

Terraform (AzAPI provider) resource definition

The mongoClusters resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DocumentDB/mongoClusters resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DocumentDB/mongoClusters@2025-07-01-preview"
  name = "string"
  parent_id = "string"
  identity {
    type = "string"
    identity_ids = [
      "string"
    ]
  }
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      administrator = {
        password = "string"
        userName = "string"
      }
      authConfig = {
        allowedModes = [
          "string"
        ]
      }
      backup = {
      }
      compute = {
        tier = "string"
      }
      createMode = "string"
      dataApi = {
        mode = "string"
      }
      encryption = {
        customerManagedKeyEncryption = {
          keyEncryptionKeyIdentity = {
            identityType = "string"
            userAssignedIdentityResourceId = "string"
          }
          keyEncryptionKeyUrl = "string"
        }
      }
      highAvailability = {
        targetMode = "string"
      }
      previewFeatures = [
        "string"
      ]
      publicNetworkAccess = "string"
      replicaParameters = {
        sourceLocation = "string"
        sourceResourceId = "string"
      }
      restoreParameters = {
        pointInTimeUTC = "string"
        sourceResourceId = "string"
      }
      serverVersion = "string"
      sharding = {
        shardCount = int
      }
      storage = {
        iops = int
        sizeGb = int
        throughput = int
        type = "string"
      }
    }
  }
}

Property Values

Microsoft.DocumentDB/mongoClusters

Name Description Value
identity The managed service identities assigned to this resource. ManagedServiceIdentity
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Min length = 3
Max length = 40
Pattern = ^[a-z0-9]+(-[a-z0-9]+)* (required)
properties The resource-specific properties for this resource. MongoClusterProperties
tags Resource tags Dictionary of tag names and values.
type The resource type "Microsoft.DocumentDB/mongoClusters@2025-07-01-preview"

AdministratorProperties

Name Description Value
password The administrator password. string

Constraints:
Sensitive value. Pass in as a secure parameter.
userName The administrator user name. string

AuthConfigProperties

Name Description Value
allowedModes Allowed authentication modes for data access on the cluster. String array containing any of:
'MicrosoftEntraID'
'NativeAuth'

BackupProperties

Name Description Value

ComputeProperties

Name Description Value
tier The compute tier to assign to the cluster, where each tier maps to a virtual-core and memory size. Example values: 'M30', 'M40'. string

CustomerManagedKeyEncryptionProperties

Name Description Value
keyEncryptionKeyIdentity The identity used to access the key encryption key. KeyEncryptionKeyIdentity (required)
keyEncryptionKeyUrl The URI of the key vault key used for encryption. string (required)

DataApiProperties

Name Description Value
mode The mode to indicate whether the Mongo Data API is enabled for a cluster. 'Disabled'
'Enabled'

EncryptionProperties

Name Description Value
customerManagedKeyEncryption Customer managed key encryption settings. CustomerManagedKeyEncryptionProperties

HighAvailabilityProperties

Name Description Value
targetMode The target high availability mode requested for the cluster. 'Disabled'
'SameZone'
'ZoneRedundantPreferred'

KeyEncryptionKeyIdentity

Name Description Value
identityType The type of identity. Only 'UserAssignedIdentity' is supported. 'UserAssignedIdentity' (required)
userAssignedIdentityResourceId The user assigned identity resource id. string (required)

ManagedServiceIdentity

Name Description Value
type Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). 'None'
'SystemAssigned'
'SystemAssigned,UserAssigned'
'UserAssigned' (required)
userAssignedIdentities The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. UserAssignedIdentities

MongoClusterProperties

Name Description Value
administrator The local administrator properties for the mongo cluster. AdministratorProperties
authConfig The authentication configuration for the cluster. AuthConfigProperties
backup The backup properties of the mongo cluster. BackupProperties
compute The compute properties of the mongo cluster. ComputeProperties
createMode The mode to create a mongo cluster. 'Default'
'GeoReplica'
'PointInTimeRestore'
'Replica'
dataApi The Data API properties of the mongo cluster. DataApiProperties
encryption The encryption configuration for the cluster. Depends on identity being configured. EncryptionProperties
highAvailability The high availability properties of the mongo cluster. HighAvailabilityProperties
previewFeatures List of private endpoint connections. String array containing any of:
'GeoReplicas'
publicNetworkAccess Whether or not public endpoint access is allowed for this mongo cluster. 'Disabled'
'Enabled'
replicaParameters The parameters to create a replica mongo cluster. MongoClusterReplicaParameters
restoreParameters The parameters to create a point-in-time restore mongo cluster. MongoClusterRestoreParameters
serverVersion The Mongo DB server version. Defaults to the latest available version if not specified. string
sharding The sharding properties of the mongo cluster. ShardingProperties
storage The storage properties of the mongo cluster. StorageProperties

MongoClusterReplicaParameters

Name Description Value
sourceLocation The location of the source cluster string (required)
sourceResourceId The id of the replication source cluster. string (required)

MongoClusterRestoreParameters

Name Description Value
pointInTimeUTC UTC point in time to restore a mongo cluster string
sourceResourceId Resource ID to locate the source cluster to restore string

ShardingProperties

Name Description Value
shardCount Number of shards to provision on the cluster. int

StorageProperties

Name Description Value
iops The IOPs of the storage assigned to each server. Only applicable if the type is 'PremiumSSDv2'. int
sizeGb The size of the data disk assigned to each server. int
throughput The throughput of the storage assigned to each server. Only applicable if the type is 'PremiumSSDv2'. int
type The type of storage to provision the cluster servers with. 'PremiumSSD'
'PremiumSSDv2'

TrackedResourceTags

Name Description Value

UserAssignedIdentities

Name Description Value

UserAssignedIdentity

Name Description Value