We recommend using Azure Native.
azure.cosmosdb.MongoCluster
Explore with Pulumi AI
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:
- Resource
Group stringName - The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
- Administrator
Password string - The Password associated with the
administrator_username
for the MongoDB Cluster. - Administrator
Username string - The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
- Compute
Tier string - The compute tier to assign to the MongoDB Cluster. Possible values are
Free
,M25
,M30
,M40
,M50
,M60
andM80
. - Create
Mode string The creation mode for the MongoDB Cluster. Possibles values are
Default
andGeoReplica
. Defaults toDefault
. Changing this forces a new resource to be created.Note The creation mode
GeoReplica
is currently in preview. It is only available whenpreview_features
is set.- High
Availability stringMode - The high availability mode for the MongoDB Cluster. Possibles values are
Disabled
andZoneRedundantPreferred
. - 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.
- Preview
Features List<string> - The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
- Public
Network stringAccess - The Public Network Access setting for the MongoDB Cluster. Possibles values are
Disabled
andEnabled
. Defaults toEnabled
. - int
- The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
- Source
Location string - The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
- Source
Server stringId - The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
- Storage
Size intIn Gb - The size of the data disk space for the MongoDB Cluster.
- 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
and7.0
.
- Resource
Group stringName - The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
- Administrator
Password string - The Password associated with the
administrator_username
for the MongoDB Cluster. - Administrator
Username string - The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
- Compute
Tier string - The compute tier to assign to the MongoDB Cluster. Possible values are
Free
,M25
,M30
,M40
,M50
,M60
andM80
. - Create
Mode string The creation mode for the MongoDB Cluster. Possibles values are
Default
andGeoReplica
. Defaults toDefault
. Changing this forces a new resource to be created.Note The creation mode
GeoReplica
is currently in preview. It is only available whenpreview_features
is set.- High
Availability stringMode - The high availability mode for the MongoDB Cluster. Possibles values are
Disabled
andZoneRedundantPreferred
. - 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.
- Preview
Features []string - The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
- Public
Network stringAccess - The Public Network Access setting for the MongoDB Cluster. Possibles values are
Disabled
andEnabled
. Defaults toEnabled
. - int
- The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
- Source
Location string - The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
- Source
Server stringId - The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
- Storage
Size intIn Gb - The size of the data disk space for the MongoDB Cluster.
- 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
and7.0
.
- resource
Group StringName - The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
- administrator
Password String - The Password associated with the
administrator_username
for the MongoDB Cluster. - administrator
Username String - The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
- compute
Tier String - The compute tier to assign to the MongoDB Cluster. Possible values are
Free
,M25
,M30
,M40
,M50
,M60
andM80
. - create
Mode String The creation mode for the MongoDB Cluster. Possibles values are
Default
andGeoReplica
. Defaults toDefault
. Changing this forces a new resource to be created.Note The creation mode
GeoReplica
is currently in preview. It is only available whenpreview_features
is set.- high
Availability StringMode - The high availability mode for the MongoDB Cluster. Possibles values are
Disabled
andZoneRedundantPreferred
. - 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.
- preview
Features List<String> - The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
- public
Network StringAccess - The Public Network Access setting for the MongoDB Cluster. Possibles values are
Disabled
andEnabled
. Defaults toEnabled
. - Integer
- The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
- source
Location String - The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
- source
Server StringId - The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
- storage
Size IntegerIn Gb - The size of the data disk space for the MongoDB Cluster.
- 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
and7.0
.
- resource
Group stringName - The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
- administrator
Password string - The Password associated with the
administrator_username
for the MongoDB Cluster. - administrator
Username string - The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
- compute
Tier string - The compute tier to assign to the MongoDB Cluster. Possible values are
Free
,M25
,M30
,M40
,M50
,M60
andM80
. - create
Mode string The creation mode for the MongoDB Cluster. Possibles values are
Default
andGeoReplica
. Defaults toDefault
. Changing this forces a new resource to be created.Note The creation mode
GeoReplica
is currently in preview. It is only available whenpreview_features
is set.- high
Availability stringMode - The high availability mode for the MongoDB Cluster. Possibles values are
Disabled
andZoneRedundantPreferred
. - 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.
- preview
Features string[] - The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
- public
Network stringAccess - The Public Network Access setting for the MongoDB Cluster. Possibles values are
Disabled
andEnabled
. Defaults toEnabled
. - number
- The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
- source
Location string - The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
- source
Server stringId - The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
- storage
Size numberIn Gb - The size of the data disk space for the MongoDB Cluster.
- {[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
and7.0
.
- resource_
group_ strname - 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
andM80
. - create_
mode str The creation mode for the MongoDB Cluster. Possibles values are
Default
andGeoReplica
. Defaults toDefault
. Changing this forces a new resource to be created.Note The creation mode
GeoReplica
is currently in preview. It is only available whenpreview_features
is set.- high_
availability_ strmode - The high availability mode for the MongoDB Cluster. Possibles values are
Disabled
andZoneRedundantPreferred
. - 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_ straccess - The Public Network Access setting for the MongoDB Cluster. Possibles values are
Disabled
andEnabled
. Defaults toEnabled
. - 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_ strid - The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
- storage_
size_ intin_ gb - The size of the data disk space for the MongoDB Cluster.
- 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
and7.0
.
- resource
Group StringName - The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
- administrator
Password String - The Password associated with the
administrator_username
for the MongoDB Cluster. - administrator
Username String - The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
- compute
Tier String - The compute tier to assign to the MongoDB Cluster. Possible values are
Free
,M25
,M30
,M40
,M50
,M60
andM80
. - create
Mode String The creation mode for the MongoDB Cluster. Possibles values are
Default
andGeoReplica
. Defaults toDefault
. Changing this forces a new resource to be created.Note The creation mode
GeoReplica
is currently in preview. It is only available whenpreview_features
is set.- high
Availability StringMode - The high availability mode for the MongoDB Cluster. Possibles values are
Disabled
andZoneRedundantPreferred
. - 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.
- preview
Features List<String> - The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
- public
Network StringAccess - The Public Network Access setting for the MongoDB Cluster. Possibles values are
Disabled
andEnabled
. Defaults toEnabled
. - Number
- The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
- source
Location String - The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
- source
Server StringId - The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
- storage
Size NumberIn Gb - The size of the data disk space for the MongoDB Cluster.
- 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
and7.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.
- Administrator
Password string - The Password associated with the
administrator_username
for the MongoDB Cluster. - Administrator
Username string - The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
- Compute
Tier string - The compute tier to assign to the MongoDB Cluster. Possible values are
Free
,M25
,M30
,M40
,M50
,M60
andM80
. - Create
Mode string The creation mode for the MongoDB Cluster. Possibles values are
Default
andGeoReplica
. Defaults toDefault
. Changing this forces a new resource to be created.Note The creation mode
GeoReplica
is currently in preview. It is only available whenpreview_features
is set.- High
Availability stringMode - The high availability mode for the MongoDB Cluster. Possibles values are
Disabled
andZoneRedundantPreferred
. - 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.
- Preview
Features List<string> - The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
- Public
Network stringAccess - The Public Network Access setting for the MongoDB Cluster. Possibles values are
Disabled
andEnabled
. Defaults toEnabled
. - Resource
Group stringName - 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 string - The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
- Source
Server stringId - The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
- Storage
Size intIn Gb - The size of the data disk space for the MongoDB Cluster.
- 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
and7.0
.
- Administrator
Password string - The Password associated with the
administrator_username
for the MongoDB Cluster. - Administrator
Username string - The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
- Compute
Tier string - The compute tier to assign to the MongoDB Cluster. Possible values are
Free
,M25
,M30
,M40
,M50
,M60
andM80
. - Create
Mode string The creation mode for the MongoDB Cluster. Possibles values are
Default
andGeoReplica
. Defaults toDefault
. Changing this forces a new resource to be created.Note The creation mode
GeoReplica
is currently in preview. It is only available whenpreview_features
is set.- High
Availability stringMode - The high availability mode for the MongoDB Cluster. Possibles values are
Disabled
andZoneRedundantPreferred
. - 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.
- Preview
Features []string - The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
- Public
Network stringAccess - The Public Network Access setting for the MongoDB Cluster. Possibles values are
Disabled
andEnabled
. Defaults toEnabled
. - Resource
Group stringName - 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 string - The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
- Source
Server stringId - The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
- Storage
Size intIn Gb - The size of the data disk space for the MongoDB Cluster.
- 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
and7.0
.
- administrator
Password String - The Password associated with the
administrator_username
for the MongoDB Cluster. - administrator
Username String - The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
- compute
Tier String - The compute tier to assign to the MongoDB Cluster. Possible values are
Free
,M25
,M30
,M40
,M50
,M60
andM80
. - create
Mode String The creation mode for the MongoDB Cluster. Possibles values are
Default
andGeoReplica
. Defaults toDefault
. Changing this forces a new resource to be created.Note The creation mode
GeoReplica
is currently in preview. It is only available whenpreview_features
is set.- high
Availability StringMode - The high availability mode for the MongoDB Cluster. Possibles values are
Disabled
andZoneRedundantPreferred
. - 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.
- preview
Features List<String> - The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
- public
Network StringAccess - The Public Network Access setting for the MongoDB Cluster. Possibles values are
Disabled
andEnabled
. Defaults toEnabled
. - resource
Group StringName - The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
- shard
Count Integer - The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
- source
Location String - The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
- source
Server StringId - The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
- storage
Size IntegerIn Gb - The size of the data disk space for the MongoDB Cluster.
- 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
and7.0
.
- administrator
Password string - The Password associated with the
administrator_username
for the MongoDB Cluster. - administrator
Username string - The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
- compute
Tier string - The compute tier to assign to the MongoDB Cluster. Possible values are
Free
,M25
,M30
,M40
,M50
,M60
andM80
. - create
Mode string The creation mode for the MongoDB Cluster. Possibles values are
Default
andGeoReplica
. Defaults toDefault
. Changing this forces a new resource to be created.Note The creation mode
GeoReplica
is currently in preview. It is only available whenpreview_features
is set.- high
Availability stringMode - The high availability mode for the MongoDB Cluster. Possibles values are
Disabled
andZoneRedundantPreferred
. - 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.
- preview
Features string[] - The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
- public
Network stringAccess - The Public Network Access setting for the MongoDB Cluster. Possibles values are
Disabled
andEnabled
. Defaults toEnabled
. - resource
Group stringName - The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
- shard
Count number - The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
- source
Location string - The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
- source
Server stringId - The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
- storage
Size numberIn Gb - The size of the data disk space for the MongoDB Cluster.
- {[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
and7.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
andM80
. - create_
mode str The creation mode for the MongoDB Cluster. Possibles values are
Default
andGeoReplica
. Defaults toDefault
. Changing this forces a new resource to be created.Note The creation mode
GeoReplica
is currently in preview. It is only available whenpreview_features
is set.- high_
availability_ strmode - The high availability mode for the MongoDB Cluster. Possibles values are
Disabled
andZoneRedundantPreferred
. - 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_ straccess - The Public Network Access setting for the MongoDB Cluster. Possibles values are
Disabled
andEnabled
. Defaults toEnabled
. - resource_
group_ strname - 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_ strid - The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
- storage_
size_ intin_ gb - The size of the data disk space for the MongoDB Cluster.
- 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
and7.0
.
- administrator
Password String - The Password associated with the
administrator_username
for the MongoDB Cluster. - administrator
Username String - The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created.
- compute
Tier String - The compute tier to assign to the MongoDB Cluster. Possible values are
Free
,M25
,M30
,M40
,M50
,M60
andM80
. - create
Mode String The creation mode for the MongoDB Cluster. Possibles values are
Default
andGeoReplica
. Defaults toDefault
. Changing this forces a new resource to be created.Note The creation mode
GeoReplica
is currently in preview. It is only available whenpreview_features
is set.- high
Availability StringMode - The high availability mode for the MongoDB Cluster. Possibles values are
Disabled
andZoneRedundantPreferred
. - 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.
- preview
Features List<String> - The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created.
- public
Network StringAccess - The Public Network Access setting for the MongoDB Cluster. Possibles values are
Disabled
andEnabled
. Defaults toEnabled
. - resource
Group StringName - The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created.
- shard
Count Number - The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created.
- source
Location String - The location of the source MongoDB Cluster. Changing this forces a new resource to be created.
- source
Server StringId - The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created.
- storage
Size NumberIn Gb - The size of the data disk space for the MongoDB Cluster.
- 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
and7.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.