1. Packages
  2. Azure Classic
  3. API Docs
  4. cosmosdb
  5. MongoCluster

We recommend using Azure Native.

Azure v6.31.0 published on Monday, Dec 29, 2025 by Pulumi
azure logo

We recommend using Azure Native.

Azure v6.31.0 published on Monday, Dec 29, 2025 by Pulumi
    Deprecated: azure.cosmosdb/mongocluster.MongoCluster has been deprecated in favor of azure.mongocluster/mongocluster.MongoCluster

    Manages a MongoDB Cluster using vCore Architecture.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-rg",
        location: "East US",
    });
    const exampleMongoCluster = new azure.mongocluster.MongoCluster("example", {
        name: "example-mc",
        resourceGroupName: example.name,
        location: example.location,
        administratorUsername: "adminTerraform",
        administratorPassword: "QAZwsx123",
        shardCount: 1,
        computeTier: "Free",
        highAvailabilityMode: "Disabled",
        storageSizeInGb: 32,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-rg",
        location="East US")
    example_mongo_cluster = azure.mongocluster.MongoCluster("example",
        name="example-mc",
        resource_group_name=example.name,
        location=example.location,
        administrator_username="adminTerraform",
        administrator_password="QAZwsx123",
        shard_count=1,
        compute_tier="Free",
        high_availability_mode="Disabled",
        storage_size_in_gb=32)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mongocluster"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-rg"),
    			Location: pulumi.String("East US"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mongocluster.NewMongoCluster(ctx, "example", &mongocluster.MongoClusterArgs{
    			Name:                  pulumi.String("example-mc"),
    			ResourceGroupName:     example.Name,
    			Location:              example.Location,
    			AdministratorUsername: pulumi.String("adminTerraform"),
    			AdministratorPassword: pulumi.String("QAZwsx123"),
    			ShardCount:            pulumi.Int(1),
    			ComputeTier:           pulumi.String("Free"),
    			HighAvailabilityMode:  pulumi.String("Disabled"),
    			StorageSizeInGb:       pulumi.Int(32),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-rg",
            Location = "East US",
        });
    
        var exampleMongoCluster = new Azure.MongoCluster.MongoCluster("example", new()
        {
            Name = "example-mc",
            ResourceGroupName = example.Name,
            Location = example.Location,
            AdministratorUsername = "adminTerraform",
            AdministratorPassword = "QAZwsx123",
            ShardCount = 1,
            ComputeTier = "Free",
            HighAvailabilityMode = "Disabled",
            StorageSizeInGb = 32,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.mongocluster.MongoCluster;
    import com.pulumi.azure.mongocluster.MongoClusterArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-rg")
                .location("East US")
                .build());
    
            var exampleMongoCluster = new MongoCluster("exampleMongoCluster", MongoClusterArgs.builder()
                .name("example-mc")
                .resourceGroupName(example.name())
                .location(example.location())
                .administratorUsername("adminTerraform")
                .administratorPassword("QAZwsx123")
                .shardCount(1)
                .computeTier("Free")
                .highAvailabilityMode("Disabled")
                .storageSizeInGb(32)
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-rg
          location: East US
      exampleMongoCluster:
        type: azure:mongocluster:MongoCluster
        name: example
        properties:
          name: example-mc
          resourceGroupName: ${example.name}
          location: ${example.location}
          administratorUsername: adminTerraform
          administratorPassword: QAZwsx123
          shardCount: '1'
          computeTier: Free
          highAvailabilityMode: Disabled
          storageSizeInGb: '32'
    

    Preview Feature GeoReplicas)

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-rg",
        location: "East US",
    });
    const exampleMongoCluster = new azure.mongocluster.MongoCluster("example", {
        name: "example-mc",
        resourceGroupName: example.name,
        location: example.location,
        administratorUsername: "adminTerraform",
        administratorPassword: "QAZwsx123",
        shardCount: 1,
        computeTier: "M30",
        highAvailabilityMode: "ZoneRedundantPreferred",
        storageSizeInGb: 64,
        previewFeatures: ["GeoReplicas"],
    });
    const exampleGeoReplica = new azure.mongocluster.MongoCluster("example_geo_replica", {
        name: "example-mc-geo",
        resourceGroupName: example.name,
        location: "Central US",
        sourceServerId: exampleMongoCluster.id,
        sourceLocation: exampleMongoCluster.location,
        createMode: "GeoReplica",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-rg",
        location="East US")
    example_mongo_cluster = azure.mongocluster.MongoCluster("example",
        name="example-mc",
        resource_group_name=example.name,
        location=example.location,
        administrator_username="adminTerraform",
        administrator_password="QAZwsx123",
        shard_count=1,
        compute_tier="M30",
        high_availability_mode="ZoneRedundantPreferred",
        storage_size_in_gb=64,
        preview_features=["GeoReplicas"])
    example_geo_replica = azure.mongocluster.MongoCluster("example_geo_replica",
        name="example-mc-geo",
        resource_group_name=example.name,
        location="Central US",
        source_server_id=example_mongo_cluster.id,
        source_location=example_mongo_cluster.location,
        create_mode="GeoReplica")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mongocluster"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-rg"),
    			Location: pulumi.String("East US"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleMongoCluster, err := mongocluster.NewMongoCluster(ctx, "example", &mongocluster.MongoClusterArgs{
    			Name:                  pulumi.String("example-mc"),
    			ResourceGroupName:     example.Name,
    			Location:              example.Location,
    			AdministratorUsername: pulumi.String("adminTerraform"),
    			AdministratorPassword: pulumi.String("QAZwsx123"),
    			ShardCount:            pulumi.Int(1),
    			ComputeTier:           pulumi.String("M30"),
    			HighAvailabilityMode:  pulumi.String("ZoneRedundantPreferred"),
    			StorageSizeInGb:       pulumi.Int(64),
    			PreviewFeatures: pulumi.StringArray{
    				pulumi.String("GeoReplicas"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mongocluster.NewMongoCluster(ctx, "example_geo_replica", &mongocluster.MongoClusterArgs{
    			Name:              pulumi.String("example-mc-geo"),
    			ResourceGroupName: example.Name,
    			Location:          pulumi.String("Central US"),
    			SourceServerId:    exampleMongoCluster.ID(),
    			SourceLocation:    exampleMongoCluster.Location,
    			CreateMode:        pulumi.String("GeoReplica"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-rg",
            Location = "East US",
        });
    
        var exampleMongoCluster = new Azure.MongoCluster.MongoCluster("example", new()
        {
            Name = "example-mc",
            ResourceGroupName = example.Name,
            Location = example.Location,
            AdministratorUsername = "adminTerraform",
            AdministratorPassword = "QAZwsx123",
            ShardCount = 1,
            ComputeTier = "M30",
            HighAvailabilityMode = "ZoneRedundantPreferred",
            StorageSizeInGb = 64,
            PreviewFeatures = new[]
            {
                "GeoReplicas",
            },
        });
    
        var exampleGeoReplica = new Azure.MongoCluster.MongoCluster("example_geo_replica", new()
        {
            Name = "example-mc-geo",
            ResourceGroupName = example.Name,
            Location = "Central US",
            SourceServerId = exampleMongoCluster.Id,
            SourceLocation = exampleMongoCluster.Location,
            CreateMode = "GeoReplica",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.mongocluster.MongoCluster;
    import com.pulumi.azure.mongocluster.MongoClusterArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-rg")
                .location("East US")
                .build());
    
            var exampleMongoCluster = new MongoCluster("exampleMongoCluster", MongoClusterArgs.builder()
                .name("example-mc")
                .resourceGroupName(example.name())
                .location(example.location())
                .administratorUsername("adminTerraform")
                .administratorPassword("QAZwsx123")
                .shardCount(1)
                .computeTier("M30")
                .highAvailabilityMode("ZoneRedundantPreferred")
                .storageSizeInGb(64)
                .previewFeatures("GeoReplicas")
                .build());
    
            var exampleGeoReplica = new MongoCluster("exampleGeoReplica", MongoClusterArgs.builder()
                .name("example-mc-geo")
                .resourceGroupName(example.name())
                .location("Central US")
                .sourceServerId(exampleMongoCluster.id())
                .sourceLocation(exampleMongoCluster.location())
                .createMode("GeoReplica")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-rg
          location: East US
      exampleMongoCluster:
        type: azure:mongocluster:MongoCluster
        name: example
        properties:
          name: example-mc
          resourceGroupName: ${example.name}
          location: ${example.location}
          administratorUsername: adminTerraform
          administratorPassword: QAZwsx123
          shardCount: '1'
          computeTier: M30
          highAvailabilityMode: ZoneRedundantPreferred
          storageSizeInGb: '64'
          previewFeatures:
            - GeoReplicas
      exampleGeoReplica:
        type: azure:mongocluster:MongoCluster
        name: example_geo_replica
        properties:
          name: example-mc-geo
          resourceGroupName: ${example.name}
          location: Central US
          sourceServerId: ${exampleMongoCluster.id}
          sourceLocation: ${exampleMongoCluster.location}
          createMode: GeoReplica
    

    API Providers

    This resource uses the following Azure API Providers:

    • Microsoft.DocumentDB - 2025-09-01

    Create MongoCluster Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MongoCluster(name: string, args: MongoClusterArgs, opts?: CustomResourceOptions);
    @overload
    def MongoCluster(resource_name: str,
                     args: MongoClusterArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def MongoCluster(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     administrator_password: Optional[str] = None,
                     administrator_username: Optional[str] = None,
                     authentication_methods: Optional[Sequence[str]] = None,
                     compute_tier: Optional[str] = None,
                     create_mode: Optional[str] = None,
                     customer_managed_key: Optional[MongoClusterCustomerManagedKeyArgs] = None,
                     data_api_mode_enabled: Optional[bool] = None,
                     high_availability_mode: Optional[str] = None,
                     identity: Optional[MongoClusterIdentityArgs] = None,
                     location: Optional[str] = None,
                     name: Optional[str] = None,
                     preview_features: Optional[Sequence[str]] = None,
                     public_network_access: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     restore: Optional[MongoClusterRestoreArgs] = None,
                     shard_count: Optional[int] = None,
                     source_location: Optional[str] = None,
                     source_server_id: Optional[str] = None,
                     storage_size_in_gb: Optional[int] = None,
                     storage_type: Optional[str] = None,
                     tags: Optional[Mapping[str, str]] = None,
                     version: Optional[str] = None)
    func NewMongoCluster(ctx *Context, name string, args MongoClusterArgs, opts ...ResourceOption) (*MongoCluster, error)
    public MongoCluster(string name, MongoClusterArgs args, CustomResourceOptions? opts = null)
    public MongoCluster(String name, MongoClusterArgs args)
    public MongoCluster(String name, MongoClusterArgs args, CustomResourceOptions options)
    
    type: azure:cosmosdb:MongoCluster
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MongoClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MongoClusterArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MongoClusterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MongoClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MongoClusterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    MongoCluster Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The MongoCluster resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
    AdministratorPassword string
    The Password associated with the administrator_username for the MongoDB Cluster.
    AdministratorUsername string
    The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
    AuthenticationMethods List<string>
    A list of allowed authentication modes for the MongoDB Cluster. Possible values are NativeAuth and MicrosoftEntraID.
    ComputeTier string
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M10, M20, M25, M30, M40, M50, M60, M80, and M200.
    CreateMode string
    The creation mode for the MongoDB Cluster. Possible values are Default, GeoReplica and PointInTimeRestore. Defaults to Default. Changing this forces a new resource to be created.
    CustomerManagedKey MongoClusterCustomerManagedKey
    A customer_managed_key block as defined below. Changing this forces a new resource to be created.
    DataApiModeEnabled bool

    Is the Data API for the MongoDB Cluster enabled? Defaults to false.

    Note: data_api_mode_enabled can only be set when create_mode is Default. Once enabled, it can only be disabled by recreating the resource.

    HighAvailabilityMode string
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    Identity MongoClusterIdentity

    An identity block as detailed below.

    Note: When adding or removing identity, a resource recreation will be triggered.

    Location string
    The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created.
    Name string
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    PreviewFeatures List<string>
    The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
    PublicNetworkAccess string
    The Public Network Access setting for the MongoDB Cluster. Possibles values are Disabled and Enabled. Defaults to Enabled.
    Restore MongoClusterRestore
    ShardCount int
    The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
    SourceLocation string
    The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
    SourceServerId string
    The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
    StorageSizeInGb int
    The size of the data disk space for the MongoDB Cluster.
    StorageType string
    The storage type for the MongoDB Cluster. Possible values are PremiumSSD and PremiumSSDv2. Defaults to PremiumSSD. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the MongoDB Cluster.
    Version string
    The version for the MongoDB Cluster. Possibles values are 5.0, 6.0, 7.0 and 8.0.
    ResourceGroupName string
    The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
    AdministratorPassword string
    The Password associated with the administrator_username for the MongoDB Cluster.
    AdministratorUsername string
    The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
    AuthenticationMethods []string
    A list of allowed authentication modes for the MongoDB Cluster. Possible values are NativeAuth and MicrosoftEntraID.
    ComputeTier string
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M10, M20, M25, M30, M40, M50, M60, M80, and M200.
    CreateMode string
    The creation mode for the MongoDB Cluster. Possible values are Default, GeoReplica and PointInTimeRestore. Defaults to Default. Changing this forces a new resource to be created.
    CustomerManagedKey MongoClusterCustomerManagedKeyArgs
    A customer_managed_key block as defined below. Changing this forces a new resource to be created.
    DataApiModeEnabled bool

    Is the Data API for the MongoDB Cluster enabled? Defaults to false.

    Note: data_api_mode_enabled can only be set when create_mode is Default. Once enabled, it can only be disabled by recreating the resource.

    HighAvailabilityMode string
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    Identity MongoClusterIdentityArgs

    An identity block as detailed below.

    Note: When adding or removing identity, a resource recreation will be triggered.

    Location string
    The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created.
    Name string
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    PreviewFeatures []string
    The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
    PublicNetworkAccess string
    The Public Network Access setting for the MongoDB Cluster. Possibles values are Disabled and Enabled. Defaults to Enabled.
    Restore MongoClusterRestoreArgs
    ShardCount int
    The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
    SourceLocation string
    The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
    SourceServerId string
    The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
    StorageSizeInGb int
    The size of the data disk space for the MongoDB Cluster.
    StorageType string
    The storage type for the MongoDB Cluster. Possible values are PremiumSSD and PremiumSSDv2. Defaults to PremiumSSD. Changing this forces a new resource to be created.
    Tags map[string]string
    A mapping of tags to assign to the MongoDB Cluster.
    Version string
    The version for the MongoDB Cluster. Possibles values are 5.0, 6.0, 7.0 and 8.0.
    resourceGroupName String
    The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
    administratorPassword String
    The Password associated with the administrator_username for the MongoDB Cluster.
    administratorUsername String
    The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
    authenticationMethods List<String>
    A list of allowed authentication modes for the MongoDB Cluster. Possible values are NativeAuth and MicrosoftEntraID.
    computeTier String
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M10, M20, M25, M30, M40, M50, M60, M80, and M200.
    createMode String
    The creation mode for the MongoDB Cluster. Possible values are Default, GeoReplica and PointInTimeRestore. Defaults to Default. Changing this forces a new resource to be created.
    customerManagedKey MongoClusterCustomerManagedKey
    A customer_managed_key block as defined below. Changing this forces a new resource to be created.
    dataApiModeEnabled Boolean

    Is the Data API for the MongoDB Cluster enabled? Defaults to false.

    Note: data_api_mode_enabled can only be set when create_mode is Default. Once enabled, it can only be disabled by recreating the resource.

    highAvailabilityMode String
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    identity MongoClusterIdentity

    An identity block as detailed below.

    Note: When adding or removing identity, a resource recreation will be triggered.

    location String
    The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created.
    name String
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    previewFeatures List<String>
    The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
    publicNetworkAccess String
    The Public Network Access setting for the MongoDB Cluster. Possibles values are Disabled and Enabled. Defaults to Enabled.
    restore MongoClusterRestore
    shardCount Integer
    The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
    sourceLocation String
    The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
    sourceServerId String
    The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
    storageSizeInGb Integer
    The size of the data disk space for the MongoDB Cluster.
    storageType String
    The storage type for the MongoDB Cluster. Possible values are PremiumSSD and PremiumSSDv2. Defaults to PremiumSSD. Changing this forces a new resource to be created.
    tags Map<String,String>
    A mapping of tags to assign to the MongoDB Cluster.
    version String
    The version for the MongoDB Cluster. Possibles values are 5.0, 6.0, 7.0 and 8.0.
    resourceGroupName string
    The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
    administratorPassword string
    The Password associated with the administrator_username for the MongoDB Cluster.
    administratorUsername string
    The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
    authenticationMethods string[]
    A list of allowed authentication modes for the MongoDB Cluster. Possible values are NativeAuth and MicrosoftEntraID.
    computeTier string
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M10, M20, M25, M30, M40, M50, M60, M80, and M200.
    createMode string
    The creation mode for the MongoDB Cluster. Possible values are Default, GeoReplica and PointInTimeRestore. Defaults to Default. Changing this forces a new resource to be created.
    customerManagedKey MongoClusterCustomerManagedKey
    A customer_managed_key block as defined below. Changing this forces a new resource to be created.
    dataApiModeEnabled boolean

    Is the Data API for the MongoDB Cluster enabled? Defaults to false.

    Note: data_api_mode_enabled can only be set when create_mode is Default. Once enabled, it can only be disabled by recreating the resource.

    highAvailabilityMode string
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    identity MongoClusterIdentity

    An identity block as detailed below.

    Note: When adding or removing identity, a resource recreation will be triggered.

    location string
    The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created.
    name string
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    previewFeatures string[]
    The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
    publicNetworkAccess string
    The Public Network Access setting for the MongoDB Cluster. Possibles values are Disabled and Enabled. Defaults to Enabled.
    restore MongoClusterRestore
    shardCount number
    The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
    sourceLocation string
    The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
    sourceServerId string
    The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
    storageSizeInGb number
    The size of the data disk space for the MongoDB Cluster.
    storageType string
    The storage type for the MongoDB Cluster. Possible values are PremiumSSD and PremiumSSDv2. Defaults to PremiumSSD. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    A mapping of tags to assign to the MongoDB Cluster.
    version string
    The version for the MongoDB Cluster. Possibles values are 5.0, 6.0, 7.0 and 8.0.
    resource_group_name str
    The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
    administrator_password str
    The Password associated with the administrator_username for the MongoDB Cluster.
    administrator_username str
    The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
    authentication_methods Sequence[str]
    A list of allowed authentication modes for the MongoDB Cluster. Possible values are NativeAuth and MicrosoftEntraID.
    compute_tier str
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M10, M20, M25, M30, M40, M50, M60, M80, and M200.
    create_mode str
    The creation mode for the MongoDB Cluster. Possible values are Default, GeoReplica and PointInTimeRestore. Defaults to Default. Changing this forces a new resource to be created.
    customer_managed_key MongoClusterCustomerManagedKeyArgs
    A customer_managed_key block as defined below. Changing this forces a new resource to be created.
    data_api_mode_enabled bool

    Is the Data API for the MongoDB Cluster enabled? Defaults to false.

    Note: data_api_mode_enabled can only be set when create_mode is Default. Once enabled, it can only be disabled by recreating the resource.

    high_availability_mode str
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    identity MongoClusterIdentityArgs

    An identity block as detailed below.

    Note: When adding or removing identity, a resource recreation will be triggered.

    location str
    The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created.
    name str
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    preview_features Sequence[str]
    The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
    public_network_access str
    The Public Network Access setting for the MongoDB Cluster. Possibles values are Disabled and Enabled. Defaults to Enabled.
    restore MongoClusterRestoreArgs
    shard_count int
    The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
    source_location str
    The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
    source_server_id str
    The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
    storage_size_in_gb int
    The size of the data disk space for the MongoDB Cluster.
    storage_type str
    The storage type for the MongoDB Cluster. Possible values are PremiumSSD and PremiumSSDv2. Defaults to PremiumSSD. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    A mapping of tags to assign to the MongoDB Cluster.
    version str
    The version for the MongoDB Cluster. Possibles values are 5.0, 6.0, 7.0 and 8.0.
    resourceGroupName String
    The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
    administratorPassword String
    The Password associated with the administrator_username for the MongoDB Cluster.
    administratorUsername String
    The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
    authenticationMethods List<String>
    A list of allowed authentication modes for the MongoDB Cluster. Possible values are NativeAuth and MicrosoftEntraID.
    computeTier String
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M10, M20, M25, M30, M40, M50, M60, M80, and M200.
    createMode String
    The creation mode for the MongoDB Cluster. Possible values are Default, GeoReplica and PointInTimeRestore. Defaults to Default. Changing this forces a new resource to be created.
    customerManagedKey Property Map
    A customer_managed_key block as defined below. Changing this forces a new resource to be created.
    dataApiModeEnabled Boolean

    Is the Data API for the MongoDB Cluster enabled? Defaults to false.

    Note: data_api_mode_enabled can only be set when create_mode is Default. Once enabled, it can only be disabled by recreating the resource.

    highAvailabilityMode String
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    identity Property Map

    An identity block as detailed below.

    Note: When adding or removing identity, a resource recreation will be triggered.

    location String
    The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created.
    name String
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    previewFeatures List<String>
    The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
    publicNetworkAccess String
    The Public Network Access setting for the MongoDB Cluster. Possibles values are Disabled and Enabled. Defaults to Enabled.
    restore Property Map
    shardCount Number
    The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
    sourceLocation String
    The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
    sourceServerId String
    The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
    storageSizeInGb Number
    The size of the data disk space for the MongoDB Cluster.
    storageType String
    The storage type for the MongoDB Cluster. Possible values are PremiumSSD and PremiumSSDv2. Defaults to PremiumSSD. Changing this forces a new resource to be created.
    tags Map<String>
    A mapping of tags to assign to the MongoDB Cluster.
    version String
    The version for the MongoDB Cluster. Possibles values are 5.0, 6.0, 7.0 and 8.0.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MongoCluster resource produces the following output properties:

    ConnectionStrings List<MongoClusterConnectionString>
    One or more connection_strings blocks as defined below.
    Id string
    The provider-assigned unique ID for this managed resource.
    ConnectionStrings []MongoClusterConnectionString
    One or more connection_strings blocks as defined below.
    Id string
    The provider-assigned unique ID for this managed resource.
    connectionStrings List<MongoClusterConnectionString>
    One or more connection_strings blocks as defined below.
    id String
    The provider-assigned unique ID for this managed resource.
    connectionStrings MongoClusterConnectionString[]
    One or more connection_strings blocks as defined below.
    id string
    The provider-assigned unique ID for this managed resource.
    connection_strings Sequence[MongoClusterConnectionString]
    One or more connection_strings blocks as defined below.
    id str
    The provider-assigned unique ID for this managed resource.
    connectionStrings List<Property Map>
    One or more connection_strings blocks as defined below.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MongoCluster Resource

    Get an existing MongoCluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: MongoClusterState, opts?: CustomResourceOptions): MongoCluster
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            administrator_password: Optional[str] = None,
            administrator_username: Optional[str] = None,
            authentication_methods: Optional[Sequence[str]] = None,
            compute_tier: Optional[str] = None,
            connection_strings: Optional[Sequence[MongoClusterConnectionStringArgs]] = None,
            create_mode: Optional[str] = None,
            customer_managed_key: Optional[MongoClusterCustomerManagedKeyArgs] = None,
            data_api_mode_enabled: Optional[bool] = None,
            high_availability_mode: Optional[str] = None,
            identity: Optional[MongoClusterIdentityArgs] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            preview_features: Optional[Sequence[str]] = None,
            public_network_access: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            restore: Optional[MongoClusterRestoreArgs] = None,
            shard_count: Optional[int] = None,
            source_location: Optional[str] = None,
            source_server_id: Optional[str] = None,
            storage_size_in_gb: Optional[int] = None,
            storage_type: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            version: Optional[str] = None) -> MongoCluster
    func GetMongoCluster(ctx *Context, name string, id IDInput, state *MongoClusterState, opts ...ResourceOption) (*MongoCluster, error)
    public static MongoCluster Get(string name, Input<string> id, MongoClusterState? state, CustomResourceOptions? opts = null)
    public static MongoCluster get(String name, Output<String> id, MongoClusterState state, CustomResourceOptions options)
    resources:  _:    type: azure:cosmosdb:MongoCluster    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AdministratorPassword string
    The Password associated with the administrator_username for the MongoDB Cluster.
    AdministratorUsername string
    The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
    AuthenticationMethods List<string>
    A list of allowed authentication modes for the MongoDB Cluster. Possible values are NativeAuth and MicrosoftEntraID.
    ComputeTier string
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M10, M20, M25, M30, M40, M50, M60, M80, and M200.
    ConnectionStrings List<MongoClusterConnectionString>
    One or more connection_strings blocks as defined below.
    CreateMode string
    The creation mode for the MongoDB Cluster. Possible values are Default, GeoReplica and PointInTimeRestore. Defaults to Default. Changing this forces a new resource to be created.
    CustomerManagedKey MongoClusterCustomerManagedKey
    A customer_managed_key block as defined below. Changing this forces a new resource to be created.
    DataApiModeEnabled bool

    Is the Data API for the MongoDB Cluster enabled? Defaults to false.

    Note: data_api_mode_enabled can only be set when create_mode is Default. Once enabled, it can only be disabled by recreating the resource.

    HighAvailabilityMode string
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    Identity MongoClusterIdentity

    An identity block as detailed below.

    Note: When adding or removing identity, a resource recreation will be triggered.

    Location string
    The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created.
    Name string
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    PreviewFeatures List<string>
    The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
    PublicNetworkAccess string
    The Public Network Access setting for the MongoDB Cluster. Possibles values are Disabled and Enabled. Defaults to Enabled.
    ResourceGroupName string
    The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
    Restore MongoClusterRestore
    ShardCount int
    The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
    SourceLocation string
    The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
    SourceServerId string
    The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
    StorageSizeInGb int
    The size of the data disk space for the MongoDB Cluster.
    StorageType string
    The storage type for the MongoDB Cluster. Possible values are PremiumSSD and PremiumSSDv2. Defaults to PremiumSSD. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the MongoDB Cluster.
    Version string
    The version for the MongoDB Cluster. Possibles values are 5.0, 6.0, 7.0 and 8.0.
    AdministratorPassword string
    The Password associated with the administrator_username for the MongoDB Cluster.
    AdministratorUsername string
    The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
    AuthenticationMethods []string
    A list of allowed authentication modes for the MongoDB Cluster. Possible values are NativeAuth and MicrosoftEntraID.
    ComputeTier string
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M10, M20, M25, M30, M40, M50, M60, M80, and M200.
    ConnectionStrings []MongoClusterConnectionStringArgs
    One or more connection_strings blocks as defined below.
    CreateMode string
    The creation mode for the MongoDB Cluster. Possible values are Default, GeoReplica and PointInTimeRestore. Defaults to Default. Changing this forces a new resource to be created.
    CustomerManagedKey MongoClusterCustomerManagedKeyArgs
    A customer_managed_key block as defined below. Changing this forces a new resource to be created.
    DataApiModeEnabled bool

    Is the Data API for the MongoDB Cluster enabled? Defaults to false.

    Note: data_api_mode_enabled can only be set when create_mode is Default. Once enabled, it can only be disabled by recreating the resource.

    HighAvailabilityMode string
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    Identity MongoClusterIdentityArgs

    An identity block as detailed below.

    Note: When adding or removing identity, a resource recreation will be triggered.

    Location string
    The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created.
    Name string
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    PreviewFeatures []string
    The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
    PublicNetworkAccess string
    The Public Network Access setting for the MongoDB Cluster. Possibles values are Disabled and Enabled. Defaults to Enabled.
    ResourceGroupName string
    The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
    Restore MongoClusterRestoreArgs
    ShardCount int
    The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
    SourceLocation string
    The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
    SourceServerId string
    The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
    StorageSizeInGb int
    The size of the data disk space for the MongoDB Cluster.
    StorageType string
    The storage type for the MongoDB Cluster. Possible values are PremiumSSD and PremiumSSDv2. Defaults to PremiumSSD. Changing this forces a new resource to be created.
    Tags map[string]string
    A mapping of tags to assign to the MongoDB Cluster.
    Version string
    The version for the MongoDB Cluster. Possibles values are 5.0, 6.0, 7.0 and 8.0.
    administratorPassword String
    The Password associated with the administrator_username for the MongoDB Cluster.
    administratorUsername String
    The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
    authenticationMethods List<String>
    A list of allowed authentication modes for the MongoDB Cluster. Possible values are NativeAuth and MicrosoftEntraID.
    computeTier String
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M10, M20, M25, M30, M40, M50, M60, M80, and M200.
    connectionStrings List<MongoClusterConnectionString>
    One or more connection_strings blocks as defined below.
    createMode String
    The creation mode for the MongoDB Cluster. Possible values are Default, GeoReplica and PointInTimeRestore. Defaults to Default. Changing this forces a new resource to be created.
    customerManagedKey MongoClusterCustomerManagedKey
    A customer_managed_key block as defined below. Changing this forces a new resource to be created.
    dataApiModeEnabled Boolean

    Is the Data API for the MongoDB Cluster enabled? Defaults to false.

    Note: data_api_mode_enabled can only be set when create_mode is Default. Once enabled, it can only be disabled by recreating the resource.

    highAvailabilityMode String
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    identity MongoClusterIdentity

    An identity block as detailed below.

    Note: When adding or removing identity, a resource recreation will be triggered.

    location String
    The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created.
    name String
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    previewFeatures List<String>
    The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
    publicNetworkAccess String
    The Public Network Access setting for the MongoDB Cluster. Possibles values are Disabled and Enabled. Defaults to Enabled.
    resourceGroupName String
    The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
    restore MongoClusterRestore
    shardCount Integer
    The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
    sourceLocation String
    The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
    sourceServerId String
    The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
    storageSizeInGb Integer
    The size of the data disk space for the MongoDB Cluster.
    storageType String
    The storage type for the MongoDB Cluster. Possible values are PremiumSSD and PremiumSSDv2. Defaults to PremiumSSD. Changing this forces a new resource to be created.
    tags Map<String,String>
    A mapping of tags to assign to the MongoDB Cluster.
    version String
    The version for the MongoDB Cluster. Possibles values are 5.0, 6.0, 7.0 and 8.0.
    administratorPassword string
    The Password associated with the administrator_username for the MongoDB Cluster.
    administratorUsername string
    The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
    authenticationMethods string[]
    A list of allowed authentication modes for the MongoDB Cluster. Possible values are NativeAuth and MicrosoftEntraID.
    computeTier string
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M10, M20, M25, M30, M40, M50, M60, M80, and M200.
    connectionStrings MongoClusterConnectionString[]
    One or more connection_strings blocks as defined below.
    createMode string
    The creation mode for the MongoDB Cluster. Possible values are Default, GeoReplica and PointInTimeRestore. Defaults to Default. Changing this forces a new resource to be created.
    customerManagedKey MongoClusterCustomerManagedKey
    A customer_managed_key block as defined below. Changing this forces a new resource to be created.
    dataApiModeEnabled boolean

    Is the Data API for the MongoDB Cluster enabled? Defaults to false.

    Note: data_api_mode_enabled can only be set when create_mode is Default. Once enabled, it can only be disabled by recreating the resource.

    highAvailabilityMode string
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    identity MongoClusterIdentity

    An identity block as detailed below.

    Note: When adding or removing identity, a resource recreation will be triggered.

    location string
    The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created.
    name string
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    previewFeatures string[]
    The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
    publicNetworkAccess string
    The Public Network Access setting for the MongoDB Cluster. Possibles values are Disabled and Enabled. Defaults to Enabled.
    resourceGroupName string
    The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
    restore MongoClusterRestore
    shardCount number
    The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
    sourceLocation string
    The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
    sourceServerId string
    The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
    storageSizeInGb number
    The size of the data disk space for the MongoDB Cluster.
    storageType string
    The storage type for the MongoDB Cluster. Possible values are PremiumSSD and PremiumSSDv2. Defaults to PremiumSSD. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    A mapping of tags to assign to the MongoDB Cluster.
    version string
    The version for the MongoDB Cluster. Possibles values are 5.0, 6.0, 7.0 and 8.0.
    administrator_password str
    The Password associated with the administrator_username for the MongoDB Cluster.
    administrator_username str
    The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
    authentication_methods Sequence[str]
    A list of allowed authentication modes for the MongoDB Cluster. Possible values are NativeAuth and MicrosoftEntraID.
    compute_tier str
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M10, M20, M25, M30, M40, M50, M60, M80, and M200.
    connection_strings Sequence[MongoClusterConnectionStringArgs]
    One or more connection_strings blocks as defined below.
    create_mode str
    The creation mode for the MongoDB Cluster. Possible values are Default, GeoReplica and PointInTimeRestore. Defaults to Default. Changing this forces a new resource to be created.
    customer_managed_key MongoClusterCustomerManagedKeyArgs
    A customer_managed_key block as defined below. Changing this forces a new resource to be created.
    data_api_mode_enabled bool

    Is the Data API for the MongoDB Cluster enabled? Defaults to false.

    Note: data_api_mode_enabled can only be set when create_mode is Default. Once enabled, it can only be disabled by recreating the resource.

    high_availability_mode str
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    identity MongoClusterIdentityArgs

    An identity block as detailed below.

    Note: When adding or removing identity, a resource recreation will be triggered.

    location str
    The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created.
    name str
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    preview_features Sequence[str]
    The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
    public_network_access str
    The Public Network Access setting for the MongoDB Cluster. Possibles values are Disabled and Enabled. Defaults to Enabled.
    resource_group_name str
    The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
    restore MongoClusterRestoreArgs
    shard_count int
    The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
    source_location str
    The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
    source_server_id str
    The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
    storage_size_in_gb int
    The size of the data disk space for the MongoDB Cluster.
    storage_type str
    The storage type for the MongoDB Cluster. Possible values are PremiumSSD and PremiumSSDv2. Defaults to PremiumSSD. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    A mapping of tags to assign to the MongoDB Cluster.
    version str
    The version for the MongoDB Cluster. Possibles values are 5.0, 6.0, 7.0 and 8.0.
    administratorPassword String
    The Password associated with the administrator_username for the MongoDB Cluster.
    administratorUsername String
    The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
    authenticationMethods List<String>
    A list of allowed authentication modes for the MongoDB Cluster. Possible values are NativeAuth and MicrosoftEntraID.
    computeTier String
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M10, M20, M25, M30, M40, M50, M60, M80, and M200.
    connectionStrings List<Property Map>
    One or more connection_strings blocks as defined below.
    createMode String
    The creation mode for the MongoDB Cluster. Possible values are Default, GeoReplica and PointInTimeRestore. Defaults to Default. Changing this forces a new resource to be created.
    customerManagedKey Property Map
    A customer_managed_key block as defined below. Changing this forces a new resource to be created.
    dataApiModeEnabled Boolean

    Is the Data API for the MongoDB Cluster enabled? Defaults to false.

    Note: data_api_mode_enabled can only be set when create_mode is Default. Once enabled, it can only be disabled by recreating the resource.

    highAvailabilityMode String
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    identity Property Map

    An identity block as detailed below.

    Note: When adding or removing identity, a resource recreation will be triggered.

    location String
    The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created.
    name String
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    previewFeatures List<String>
    The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
    publicNetworkAccess String
    The Public Network Access setting for the MongoDB Cluster. Possibles values are Disabled and Enabled. Defaults to Enabled.
    resourceGroupName String
    The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
    restore Property Map
    shardCount Number
    The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
    sourceLocation String
    The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
    sourceServerId String
    The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
    storageSizeInGb Number
    The size of the data disk space for the MongoDB Cluster.
    storageType String
    The storage type for the MongoDB Cluster. Possible values are PremiumSSD and PremiumSSDv2. Defaults to PremiumSSD. Changing this forces a new resource to be created.
    tags Map<String>
    A mapping of tags to assign to the MongoDB Cluster.
    version String
    The version for the MongoDB Cluster. Possibles values are 5.0, 6.0, 7.0 and 8.0.

    Supporting Types

    MongoClusterConnectionString, MongoClusterConnectionStringArgs

    Description string
    The description of the connection string.
    Name string
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    Value string
    The value of the Mongo Cluster connection string. The <user>:<password> placeholder returned from API will be replaced by the real administrator_username and administrator_password if available in the state.
    Description string
    The description of the connection string.
    Name string
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    Value string
    The value of the Mongo Cluster connection string. The <user>:<password> placeholder returned from API will be replaced by the real administrator_username and administrator_password if available in the state.
    description String
    The description of the connection string.
    name String
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    value String
    The value of the Mongo Cluster connection string. The <user>:<password> placeholder returned from API will be replaced by the real administrator_username and administrator_password if available in the state.
    description string
    The description of the connection string.
    name string
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    value string
    The value of the Mongo Cluster connection string. The <user>:<password> placeholder returned from API will be replaced by the real administrator_username and administrator_password if available in the state.
    description str
    The description of the connection string.
    name str
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    value str
    The value of the Mongo Cluster connection string. The <user>:<password> placeholder returned from API will be replaced by the real administrator_username and administrator_password if available in the state.
    description String
    The description of the connection string.
    name String
    The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created.
    value String
    The value of the Mongo Cluster connection string. The <user>:<password> placeholder returned from API will be replaced by the real administrator_username and administrator_password if available in the state.

    MongoClusterCustomerManagedKey, MongoClusterCustomerManagedKeyArgs

    KeyVaultKeyId string
    The ID of the key vault key used for encryption. For example: https://example-vault-name.vault.azure.net/keys/example-key-name.
    UserAssignedIdentityId string
    The ID of the User Assigned Identity that has access to the Key Vault Key.
    KeyVaultKeyId string
    The ID of the key vault key used for encryption. For example: https://example-vault-name.vault.azure.net/keys/example-key-name.
    UserAssignedIdentityId string
    The ID of the User Assigned Identity that has access to the Key Vault Key.
    keyVaultKeyId String
    The ID of the key vault key used for encryption. For example: https://example-vault-name.vault.azure.net/keys/example-key-name.
    userAssignedIdentityId String
    The ID of the User Assigned Identity that has access to the Key Vault Key.
    keyVaultKeyId string
    The ID of the key vault key used for encryption. For example: https://example-vault-name.vault.azure.net/keys/example-key-name.
    userAssignedIdentityId string
    The ID of the User Assigned Identity that has access to the Key Vault Key.
    key_vault_key_id str
    The ID of the key vault key used for encryption. For example: https://example-vault-name.vault.azure.net/keys/example-key-name.
    user_assigned_identity_id str
    The ID of the User Assigned Identity that has access to the Key Vault Key.
    keyVaultKeyId String
    The ID of the key vault key used for encryption. For example: https://example-vault-name.vault.azure.net/keys/example-key-name.
    userAssignedIdentityId String
    The ID of the User Assigned Identity that has access to the Key Vault Key.

    MongoClusterIdentity, MongoClusterIdentityArgs

    IdentityIds List<string>

    A list of one or more Resource IDs for User Assigned Managed identities to assign.

    Note: Required when type is set to UserAssigned.

    Type string
    The type of managed identity to assign. Possible value is UserAssigned.
    IdentityIds []string

    A list of one or more Resource IDs for User Assigned Managed identities to assign.

    Note: Required when type is set to UserAssigned.

    Type string
    The type of managed identity to assign. Possible value is UserAssigned.
    identityIds List<String>

    A list of one or more Resource IDs for User Assigned Managed identities to assign.

    Note: Required when type is set to UserAssigned.

    type String
    The type of managed identity to assign. Possible value is UserAssigned.
    identityIds string[]

    A list of one or more Resource IDs for User Assigned Managed identities to assign.

    Note: Required when type is set to UserAssigned.

    type string
    The type of managed identity to assign. Possible value is UserAssigned.
    identity_ids Sequence[str]

    A list of one or more Resource IDs for User Assigned Managed identities to assign.

    Note: Required when type is set to UserAssigned.

    type str
    The type of managed identity to assign. Possible value is UserAssigned.
    identityIds List<String>

    A list of one or more Resource IDs for User Assigned Managed identities to assign.

    Note: Required when type is set to UserAssigned.

    type String
    The type of managed identity to assign. Possible value is UserAssigned.

    MongoClusterRestore, MongoClusterRestoreArgs

    PointInTimeUtc string
    The point in time (in UTC) to restore from, in ISO 8601 format (e.g., 2024-01-01T00:00:00Z). Changing this forces a new resource to be created.
    SourceId string
    The ID of the source MongoDB Cluster to restore from. Changing this forces a new resource to be created.
    PointInTimeUtc string
    The point in time (in UTC) to restore from, in ISO 8601 format (e.g., 2024-01-01T00:00:00Z). Changing this forces a new resource to be created.
    SourceId string
    The ID of the source MongoDB Cluster to restore from. Changing this forces a new resource to be created.
    pointInTimeUtc String
    The point in time (in UTC) to restore from, in ISO 8601 format (e.g., 2024-01-01T00:00:00Z). Changing this forces a new resource to be created.
    sourceId String
    The ID of the source MongoDB Cluster to restore from. Changing this forces a new resource to be created.
    pointInTimeUtc string
    The point in time (in UTC) to restore from, in ISO 8601 format (e.g., 2024-01-01T00:00:00Z). Changing this forces a new resource to be created.
    sourceId string
    The ID of the source MongoDB Cluster to restore from. Changing this forces a new resource to be created.
    point_in_time_utc str
    The point in time (in UTC) to restore from, in ISO 8601 format (e.g., 2024-01-01T00:00:00Z). Changing this forces a new resource to be created.
    source_id str
    The ID of the source MongoDB Cluster to restore from. Changing this forces a new resource to be created.
    pointInTimeUtc String
    The point in time (in UTC) to restore from, in ISO 8601 format (e.g., 2024-01-01T00:00:00Z). Changing this forces a new resource to be created.
    sourceId String
    The ID of the source MongoDB Cluster to restore from. Changing this forces a new resource to be created.

    Import

    MongoDB Clusters can be imported using the resource id, e.g.

    $ pulumi import azure:cosmosdb/mongoCluster:MongoCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.31.0 published on Monday, Dec 29, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate