import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a MongoDB Cluster using vCore Architecture. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-rg", * location: "East US", * }); * const exampleMongoCluster = new azure.mongocluster.MongoCluster("example", { * name: "example-mc", * resourceGroupName: example.name, * location: example.location, * administratorUsername: "adminTerraform", * administratorPassword: "QAZwsx123", * computeTier: "Free", * highAvailabilityMode: "Disabled", * shardCount: 1, * storageSizeInGb: 32, * version: "8.0", * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.DocumentDB` - 2025-09-01 * * ## Import * * MongoDB Clusters can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:mongocluster/mongoCluster:MongoCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster * ``` */ export declare class MongoCluster extends pulumi.CustomResource { /** * Get an existing MongoCluster resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: MongoClusterState, opts?: pulumi.CustomResourceOptions): MongoCluster; /** * Returns true if the given object is an instance of MongoCluster. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is MongoCluster; /** * The Password associated with the `administratorUsername` for the MongoDB Cluster. */ readonly administratorPassword: pulumi.Output; /** * The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created. */ readonly administratorUsername: pulumi.Output; /** * A list of allowed authentication modes for the MongoDB Cluster. Possible values are `NativeAuth` and `MicrosoftEntraID`. */ readonly authenticationMethods: pulumi.Output; /** * The compute tier to assign to the MongoDB Cluster. Possible values are `Free`, `M10`, `M20`, `M25`, `M30`, `M40`, `M50`, `M60`, `M80`, and `M200`. */ readonly computeTier: pulumi.Output; /** * One or more `connectionStrings` blocks as defined below. */ readonly connectionStrings: pulumi.Output; /** * The creation mode for the MongoDB Cluster. Possible values are `Default`, `GeoReplica` and `PointInTimeRestore`. Defaults to `Default`. Changing this forces a new resource to be created. */ readonly createMode: pulumi.Output; /** * A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. */ readonly customerManagedKey: pulumi.Output; /** * Is the Data API for the MongoDB Cluster enabled? Defaults to `false`. * * > **Note:** `dataApiModeEnabled` can only be set when `createMode` is `Default`. Once enabled, it can only be disabled by recreating the resource. */ readonly dataApiModeEnabled: pulumi.Output; /** * The high availability mode for the MongoDB Cluster. Possibles values are `Disabled` and `ZoneRedundantPreferred`. */ readonly highAvailabilityMode: pulumi.Output; /** * An `identity` block as detailed below. * * > **Note:** When adding or removing `identity`, a resource recreation will be triggered. */ readonly identity: pulumi.Output; /** * The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created. */ readonly previewFeatures: pulumi.Output; /** * The Public Network Access setting for the MongoDB Cluster. Possibles values are `Disabled` and `Enabled`. Defaults to `Enabled`. */ readonly publicNetworkAccess: pulumi.Output; /** * The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * A `restore` block as defined below. Required when `createMode` is set to `PointInTimeRestore`. Changing this forces a new resource to be created. * * > **Note:** When `PointInTimeRestore` is enabled, service API will also assign a value to `sourceServerId`. The user has to explicitly set this property in the Terraform configuration or handle it using `ignoreChanges`. */ readonly restore: pulumi.Output; /** * The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created. */ readonly shardCount: pulumi.Output; /** * The location of the source MongoDB Cluster. Changing this forces a new resource to be created. */ readonly sourceLocation: pulumi.Output; /** * The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created. */ readonly sourceServerId: pulumi.Output; /** * The size of the data disk space for the MongoDB Cluster. */ readonly storageSizeInGb: pulumi.Output; /** * The storage type for the MongoDB Cluster. Possible values are `PremiumSSD` and `PremiumSSDv2`. Defaults to `PremiumSSD`. Changing this forces a new resource to be created. */ readonly storageType: pulumi.Output; /** * A mapping of tags to assign to the MongoDB Cluster. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The version for the MongoDB Cluster. Possibles values are `5.0`, `6.0`, `7.0` and `8.0`. * * > **Note:** `version` is required when `createMode` is `Default`. */ readonly version: pulumi.Output; /** * Create a MongoCluster resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: MongoClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering MongoCluster resources. */ export interface MongoClusterState { /** * The Password associated with the `administratorUsername` for the MongoDB Cluster. */ administratorPassword?: pulumi.Input; /** * The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created. */ administratorUsername?: pulumi.Input; /** * A list of allowed authentication modes for the MongoDB Cluster. Possible values are `NativeAuth` and `MicrosoftEntraID`. */ authenticationMethods?: pulumi.Input[]>; /** * The compute tier to assign to the MongoDB Cluster. Possible values are `Free`, `M10`, `M20`, `M25`, `M30`, `M40`, `M50`, `M60`, `M80`, and `M200`. */ computeTier?: pulumi.Input; /** * One or more `connectionStrings` blocks as defined below. */ connectionStrings?: pulumi.Input[]>; /** * The creation mode for the MongoDB Cluster. Possible values are `Default`, `GeoReplica` and `PointInTimeRestore`. Defaults to `Default`. Changing this forces a new resource to be created. */ createMode?: pulumi.Input; /** * A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. */ customerManagedKey?: pulumi.Input; /** * Is the Data API for the MongoDB Cluster enabled? Defaults to `false`. * * > **Note:** `dataApiModeEnabled` can only be set when `createMode` is `Default`. Once enabled, it can only be disabled by recreating the resource. */ dataApiModeEnabled?: pulumi.Input; /** * The high availability mode for the MongoDB Cluster. Possibles values are `Disabled` and `ZoneRedundantPreferred`. */ highAvailabilityMode?: pulumi.Input; /** * An `identity` block as detailed below. * * > **Note:** When adding or removing `identity`, a resource recreation will be triggered. */ identity?: pulumi.Input; /** * The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created. */ previewFeatures?: pulumi.Input[]>; /** * The Public Network Access setting for the MongoDB Cluster. Possibles values are `Disabled` and `Enabled`. Defaults to `Enabled`. */ publicNetworkAccess?: pulumi.Input; /** * The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * A `restore` block as defined below. Required when `createMode` is set to `PointInTimeRestore`. Changing this forces a new resource to be created. * * > **Note:** When `PointInTimeRestore` is enabled, service API will also assign a value to `sourceServerId`. The user has to explicitly set this property in the Terraform configuration or handle it using `ignoreChanges`. */ restore?: pulumi.Input; /** * The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created. */ shardCount?: pulumi.Input; /** * The location of the source MongoDB Cluster. Changing this forces a new resource to be created. */ sourceLocation?: pulumi.Input; /** * The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created. */ sourceServerId?: pulumi.Input; /** * The size of the data disk space for the MongoDB Cluster. */ storageSizeInGb?: pulumi.Input; /** * The storage type for the MongoDB Cluster. Possible values are `PremiumSSD` and `PremiumSSDv2`. Defaults to `PremiumSSD`. Changing this forces a new resource to be created. */ storageType?: pulumi.Input; /** * A mapping of tags to assign to the MongoDB Cluster. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The version for the MongoDB Cluster. Possibles values are `5.0`, `6.0`, `7.0` and `8.0`. * * > **Note:** `version` is required when `createMode` is `Default`. */ version?: pulumi.Input; } /** * The set of arguments for constructing a MongoCluster resource. */ export interface MongoClusterArgs { /** * The Password associated with the `administratorUsername` for the MongoDB Cluster. */ administratorPassword?: pulumi.Input; /** * The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created. */ administratorUsername?: pulumi.Input; /** * A list of allowed authentication modes for the MongoDB Cluster. Possible values are `NativeAuth` and `MicrosoftEntraID`. */ authenticationMethods?: pulumi.Input[]>; /** * The compute tier to assign to the MongoDB Cluster. Possible values are `Free`, `M10`, `M20`, `M25`, `M30`, `M40`, `M50`, `M60`, `M80`, and `M200`. */ computeTier?: pulumi.Input; /** * The creation mode for the MongoDB Cluster. Possible values are `Default`, `GeoReplica` and `PointInTimeRestore`. Defaults to `Default`. Changing this forces a new resource to be created. */ createMode?: pulumi.Input; /** * A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. */ customerManagedKey?: pulumi.Input; /** * Is the Data API for the MongoDB Cluster enabled? Defaults to `false`. * * > **Note:** `dataApiModeEnabled` can only be set when `createMode` is `Default`. Once enabled, it can only be disabled by recreating the resource. */ dataApiModeEnabled?: pulumi.Input; /** * The high availability mode for the MongoDB Cluster. Possibles values are `Disabled` and `ZoneRedundantPreferred`. */ highAvailabilityMode?: pulumi.Input; /** * An `identity` block as detailed below. * * > **Note:** When adding or removing `identity`, a resource recreation will be triggered. */ identity?: pulumi.Input; /** * The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created. */ previewFeatures?: pulumi.Input[]>; /** * The Public Network Access setting for the MongoDB Cluster. Possibles values are `Disabled` and `Enabled`. Defaults to `Enabled`. */ publicNetworkAccess?: pulumi.Input; /** * The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * A `restore` block as defined below. Required when `createMode` is set to `PointInTimeRestore`. Changing this forces a new resource to be created. * * > **Note:** When `PointInTimeRestore` is enabled, service API will also assign a value to `sourceServerId`. The user has to explicitly set this property in the Terraform configuration or handle it using `ignoreChanges`. */ restore?: pulumi.Input; /** * The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created. */ shardCount?: pulumi.Input; /** * The location of the source MongoDB Cluster. Changing this forces a new resource to be created. */ sourceLocation?: pulumi.Input; /** * The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created. */ sourceServerId?: pulumi.Input; /** * The size of the data disk space for the MongoDB Cluster. */ storageSizeInGb?: pulumi.Input; /** * The storage type for the MongoDB Cluster. Possible values are `PremiumSSD` and `PremiumSSDv2`. Defaults to `PremiumSSD`. Changing this forces a new resource to be created. */ storageType?: pulumi.Input; /** * A mapping of tags to assign to the MongoDB Cluster. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The version for the MongoDB Cluster. Possibles values are `5.0`, `6.0`, `7.0` and `8.0`. * * > **Note:** `version` is required when `createMode` is `Default`. */ version?: pulumi.Input; }