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

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.cosmosdb.MongoCluster

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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.cosmosdb.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.cosmosdb.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/cosmosdb"
    	"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 = cosmosdb.NewMongoCluster(ctx, "example", &cosmosdb.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.CosmosDB.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.cosmosdb.MongoCluster;
    import com.pulumi.azure.cosmosdb.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:cosmosdb: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.cosmosdb.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.cosmosdb.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.cosmosdb.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.cosmosdb.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/cosmosdb"
    	"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 := cosmosdb.NewMongoCluster(ctx, "example", &cosmosdb.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 = cosmosdb.NewMongoCluster(ctx, "example_geo_replica", &cosmosdb.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.CosmosDB.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.CosmosDB.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.cosmosdb.MongoCluster;
    import com.pulumi.azure.cosmosdb.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:cosmosdb: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:cosmosdb:MongoCluster
        name: example_geo_replica
        properties:
          name: example-mc-geo
          resourceGroupName: ${example.name}
          location: Central US
          sourceServerId: ${exampleMongoCluster.id}
          sourceLocation: ${exampleMongoCluster.location}
          createMode: GeoReplica
    

    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,
                     resource_group_name: Optional[str] = None,
                     public_network_access: Optional[str] = None,
                     administrator_username: Optional[str] = None,
                     create_mode: Optional[str] = None,
                     high_availability_mode: Optional[str] = None,
                     location: Optional[str] = None,
                     name: Optional[str] = None,
                     compute_tier: Optional[str] = None,
                     administrator_password: Optional[str] = None,
                     preview_features: Optional[Sequence[str]] = None,
                     shard_count: Optional[int] = None,
                     source_location: Optional[str] = None,
                     source_server_id: Optional[str] = None,
                     storage_size_in_gb: Optional[int] = 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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var mongoClusterResource = new Azure.CosmosDB.MongoCluster("mongoClusterResource", new()
    {
        ResourceGroupName = "string",
        PublicNetworkAccess = "string",
        AdministratorUsername = "string",
        CreateMode = "string",
        HighAvailabilityMode = "string",
        Location = "string",
        Name = "string",
        ComputeTier = "string",
        AdministratorPassword = "string",
        PreviewFeatures = new[]
        {
            "string",
        },
        ShardCount = 0,
        SourceLocation = "string",
        SourceServerId = "string",
        StorageSizeInGb = 0,
        Tags = 
        {
            { "string", "string" },
        },
        Version = "string",
    });
    
    example, err := cosmosdb.NewMongoCluster(ctx, "mongoClusterResource", &cosmosdb.MongoClusterArgs{
    	ResourceGroupName:     pulumi.String("string"),
    	PublicNetworkAccess:   pulumi.String("string"),
    	AdministratorUsername: pulumi.String("string"),
    	CreateMode:            pulumi.String("string"),
    	HighAvailabilityMode:  pulumi.String("string"),
    	Location:              pulumi.String("string"),
    	Name:                  pulumi.String("string"),
    	ComputeTier:           pulumi.String("string"),
    	AdministratorPassword: pulumi.String("string"),
    	PreviewFeatures: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ShardCount:      pulumi.Int(0),
    	SourceLocation:  pulumi.String("string"),
    	SourceServerId:  pulumi.String("string"),
    	StorageSizeInGb: pulumi.Int(0),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Version: pulumi.String("string"),
    })
    
    var mongoClusterResource = new MongoCluster("mongoClusterResource", MongoClusterArgs.builder()
        .resourceGroupName("string")
        .publicNetworkAccess("string")
        .administratorUsername("string")
        .createMode("string")
        .highAvailabilityMode("string")
        .location("string")
        .name("string")
        .computeTier("string")
        .administratorPassword("string")
        .previewFeatures("string")
        .shardCount(0)
        .sourceLocation("string")
        .sourceServerId("string")
        .storageSizeInGb(0)
        .tags(Map.of("string", "string"))
        .version("string")
        .build());
    
    mongo_cluster_resource = azure.cosmosdb.MongoCluster("mongoClusterResource",
        resource_group_name="string",
        public_network_access="string",
        administrator_username="string",
        create_mode="string",
        high_availability_mode="string",
        location="string",
        name="string",
        compute_tier="string",
        administrator_password="string",
        preview_features=["string"],
        shard_count=0,
        source_location="string",
        source_server_id="string",
        storage_size_in_gb=0,
        tags={
            "string": "string",
        },
        version="string")
    
    const mongoClusterResource = new azure.cosmosdb.MongoCluster("mongoClusterResource", {
        resourceGroupName: "string",
        publicNetworkAccess: "string",
        administratorUsername: "string",
        createMode: "string",
        highAvailabilityMode: "string",
        location: "string",
        name: "string",
        computeTier: "string",
        administratorPassword: "string",
        previewFeatures: ["string"],
        shardCount: 0,
        sourceLocation: "string",
        sourceServerId: "string",
        storageSizeInGb: 0,
        tags: {
            string: "string",
        },
        version: "string",
    });
    
    type: azure:cosmosdb:MongoCluster
    properties:
        administratorPassword: string
        administratorUsername: string
        computeTier: string
        createMode: string
        highAvailabilityMode: string
        location: string
        name: string
        previewFeatures:
            - string
        publicNetworkAccess: string
        resourceGroupName: string
        shardCount: 0
        sourceLocation: string
        sourceServerId: string
        storageSizeInGb: 0
        tags:
            string: string
        version: string
    

    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.
    ComputeTier string
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M25, M30, M40, M50, M60 and M80.
    CreateMode string

    The creation mode for the MongoDB Cluster. Possibles values are Default and GeoReplica. Defaults to Default. Changing this forces a new resource to be created.

    Note The creation mode GeoReplica is currently in preview. It is only available when preview_features is set.

    HighAvailabilityMode string
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    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.
    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.
    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 and 7.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.
    ComputeTier string
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M25, M30, M40, M50, M60 and M80.
    CreateMode string

    The creation mode for the MongoDB Cluster. Possibles values are Default and GeoReplica. Defaults to Default. Changing this forces a new resource to be created.

    Note The creation mode GeoReplica is currently in preview. It is only available when preview_features is set.

    HighAvailabilityMode string
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    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.
    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.
    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 and 7.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.
    computeTier String
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M25, M30, M40, M50, M60 and M80.
    createMode String

    The creation mode for the MongoDB Cluster. Possibles values are Default and GeoReplica. Defaults to Default. Changing this forces a new resource to be created.

    Note The creation mode GeoReplica is currently in preview. It is only available when preview_features is set.

    highAvailabilityMode String
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    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.
    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.
    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 and 7.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.
    computeTier string
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M25, M30, M40, M50, M60 and M80.
    createMode string

    The creation mode for the MongoDB Cluster. Possibles values are Default and GeoReplica. Defaults to Default. Changing this forces a new resource to be created.

    Note The creation mode GeoReplica is currently in preview. It is only available when preview_features is set.

    highAvailabilityMode string
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    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.
    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.
    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 and 7.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.
    compute_tier str
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M25, M30, M40, M50, M60 and M80.
    create_mode str

    The creation mode for the MongoDB Cluster. Possibles values are Default and GeoReplica. Defaults to Default. Changing this forces a new resource to be created.

    Note The creation mode GeoReplica is currently in preview. It is only available when preview_features is set.

    high_availability_mode str
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    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.
    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.
    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 and 7.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.
    computeTier String
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M25, M30, M40, M50, M60 and M80.
    createMode String

    The creation mode for the MongoDB Cluster. Possibles values are Default and GeoReplica. Defaults to Default. Changing this forces a new resource to be created.

    Note The creation mode GeoReplica is currently in preview. It is only available when preview_features is set.

    highAvailabilityMode String
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    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.
    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.
    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 and 7.0.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    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,
            compute_tier: Optional[str] = None,
            create_mode: Optional[str] = None,
            high_availability_mode: Optional[str] = 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,
            shard_count: Optional[int] = None,
            source_location: Optional[str] = None,
            source_server_id: Optional[str] = None,
            storage_size_in_gb: Optional[int] = 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)
    Resource lookup is not supported in YAML
    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.
    ComputeTier string
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M25, M30, M40, M50, M60 and M80.
    CreateMode string

    The creation mode for the MongoDB Cluster. Possibles values are Default and GeoReplica. Defaults to Default. Changing this forces a new resource to be created.

    Note The creation mode GeoReplica is currently in preview. It is only available when preview_features is set.

    HighAvailabilityMode string
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    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.
    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.
    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 and 7.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.
    ComputeTier string
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M25, M30, M40, M50, M60 and M80.
    CreateMode string

    The creation mode for the MongoDB Cluster. Possibles values are Default and GeoReplica. Defaults to Default. Changing this forces a new resource to be created.

    Note The creation mode GeoReplica is currently in preview. It is only available when preview_features is set.

    HighAvailabilityMode string
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    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.
    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.
    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 and 7.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.
    computeTier String
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M25, M30, M40, M50, M60 and M80.
    createMode String

    The creation mode for the MongoDB Cluster. Possibles values are Default and GeoReplica. Defaults to Default. Changing this forces a new resource to be created.

    Note The creation mode GeoReplica is currently in preview. It is only available when preview_features is set.

    highAvailabilityMode String
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    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.
    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.
    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 and 7.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.
    computeTier string
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M25, M30, M40, M50, M60 and M80.
    createMode string

    The creation mode for the MongoDB Cluster. Possibles values are Default and GeoReplica. Defaults to Default. Changing this forces a new resource to be created.

    Note The creation mode GeoReplica is currently in preview. It is only available when preview_features is set.

    highAvailabilityMode string
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    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.
    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.
    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 and 7.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.
    compute_tier str
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M25, M30, M40, M50, M60 and M80.
    create_mode str

    The creation mode for the MongoDB Cluster. Possibles values are Default and GeoReplica. Defaults to Default. Changing this forces a new resource to be created.

    Note The creation mode GeoReplica is currently in preview. It is only available when preview_features is set.

    high_availability_mode str
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    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.
    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.
    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 and 7.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.
    computeTier String
    The compute tier to assign to the MongoDB Cluster. Possible values are Free, M25, M30, M40, M50, M60 and M80.
    createMode String

    The creation mode for the MongoDB Cluster. Possibles values are Default and GeoReplica. Defaults to Default. Changing this forces a new resource to be created.

    Note The creation mode GeoReplica is currently in preview. It is only available when preview_features is set.

    highAvailabilityMode String
    The high availability mode for the MongoDB Cluster. Possibles values are Disabled and ZoneRedundantPreferred.
    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.
    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.
    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 and 7.0.

    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.10.0 published on Tuesday, Nov 19, 2024 by Pulumi