import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * MongoDB document database supports multiple architectures for flexible business deployment. In addition to replica set instances, MongoDB document database also provides sharded cluster architecture for large-scale data scenarios, along with disaster recovery, backup and restore, monitoring, and a complete solution set. It is widely used in industries such as internet (gaming, e-commerce, live streaming, news, social), new retail, online education, finance, IoT, and government/enterprise. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcenginecc from "@volcengine/pulumi-volcenginecc"; * * const mongoDBInstanceDemo = new volcenginecc.mongodb.Instance("MongoDBInstanceDemo", { * zoneId: "cn-beijing-a,cn-beijing-c,cn-beijing-d", * vpcId: "vpc-1a1vgeo9xxxcg8nvepjyxxxxx", * subnetId: "subnet-ij9s4hxxxs3k74o8cuxxxxx", * dbEngine: "MongoDB", * dbEngineVersion: "MongoDB_7_0", * instanceType: "ShardedCluster", * nodeSpec: "mongo.shard.2c4g", * nodeNumber: 3, * mongosNodeSpec: "mongo.mongos.2c4g", * mongosNodeNumber: 3, * shardNumber: 2, * storageSpaceGb: 100, * configServerNodeSpec: "mongo.config.2c4g", * configServerStorageSpaceGb: 20, * superAccountName: "****", * superAccountPassword: "*******", * instanceName: "MongoDBInstanceDemo", * instanceCount: 1, * chargeType: "PostPaid", * projectName: "default", * tags: [{ * key: "env", * value: "test", * }], * allowListIds: [ * "acl-c972e7b4ce4941a1a8d5xxxe57xxxxx", * "acl-70dbb8ee8893467dbafxxxc964xxxxx", * ], * }); * ``` * * ## Import * * ```sh * $ pulumi import volcenginecc:mongodb/instance:Instance example "instance_id" * ``` */ export declare class Instance extends pulumi.CustomResource { /** * Get an existing Instance 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?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance; /** * Returns true if the given object is an instance of Instance. 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 Instance; /** * Allowlist ID list. New instances are bound to the specified allowlist. */ readonly allowListIds: pulumi.Output; /** * Enable auto-renewal. Options: false (default): auto-renewal disabled. true: auto-renewal enabled. */ readonly autoRenew: pulumi.Output; /** * Instance billing status. Valid values: Normal: normal. WaitingPaid: waiting for payment. ChangingPayType: changing billing type. Renewing: renewing. Overdue: overdue. Owing: owing. Unsubscribing: unsubscribing. */ readonly chargeStatus: pulumi.Output; /** * Instance billing type. Options: PostPaid (default): pay-as-you-go (also called postpaid). Prepaid: subscription (also called prepaid). */ readonly chargeType: pulumi.Output; /** * Scheduled shutdown time (UTC). */ readonly closedTime: pulumi.Output; /** * ConfigServer node specification code in the sharded cluster. Default: mongo.config.1c2g. */ readonly configServerNodeSpec: pulumi.Output; /** * ConfigServer storage space in the sharded cluster, unit: GiB. Step size: 10. Default: 20. */ readonly configServerStorageSpaceGb: pulumi.Output; readonly configServers: pulumi.Output; /** * ConfigServer ID */ readonly configServersId: pulumi.Output; /** * Instance creation time (UTC). */ readonly createdTime: pulumi.Output; /** * Database engine. The value is fixed as MongoDB */ readonly dbEngine: pulumi.Output; /** * Database engine version. Options: MongoDB*4*0 (default): MongoDB 4.0. MongoDB*4*2: MongoDB 4.2. MongoDB*4*4: MongoDB 4.4. MongoDB*5*0: MongoDB 5.0. MongoDB*6*0: MongoDB 6.0. MongoDB*7*0: MongoDB 7.0. */ readonly dbEngineVersion: pulumi.Output; /** * Database engine version string */ readonly dbEngineVersionStr: pulumi.Output; /** * Instance expiration time (UTC). */ readonly expiredTime: pulumi.Output; /** * Number of instances to create. Must be a positive integer greater than or equal to 1. Default is 1. */ readonly instanceCount: pulumi.Output; /** * Instance ID. */ readonly instanceId: pulumi.Output; /** * Instance name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 2–64 characters. */ readonly instanceName: pulumi.Output; readonly instanceParameters: pulumi.Output; /** * Instance status. Creating: Creating. Running: Running. Allowlist maintenance: AllowListMaintaining. Scaling: Scaling. Restarting: Restarting. Network maintaining: NetworkMaintaining. Restoring: Restoring. Upgrading: Upgrading. Unavailable: Unavailable. Closing: Closing. Deleting: Deleting. Closed: Closed. SSL updating: SSLUpdating. Switch mastering: SwitchMastering. Role changing: RoleChanging. Migrating: Migrating. */ readonly instanceStatus: pulumi.Output; /** * MongoDB instance type. Valid values: ReplicaSet (default): replica set. ShardedCluster: sharded cluster. */ readonly instanceType: pulumi.Output; readonly mongos: pulumi.Output; /** * Mongos ID. */ readonly mongosId: pulumi.Output; /** * Number of Mongos nodes in the sharded cluster. Range: 2~32. */ readonly mongosNodeNumber: pulumi.Output; /** * Specification code for Mongos nodes in a sharded cluster. */ readonly mongosNodeSpec: pulumi.Output; readonly nodeAvailabilityZones: pulumi.Output; /** * Node count. When the instance type is ReplicaSet, this parameter indicates the number of compute nodes in the replica set instance. When the instance type is ShardedCluster, it indicates the number of nodes in each shard. */ readonly nodeNumber: pulumi.Output; /** * Instance specification code. When the instance type is ReplicaSet (InstanceType is ReplicaSet), this parameter specifies the compute node specification for the replica set instance. When the instance type is ShardedCluster (InstanceType is ShardedCluster), this parameter specifies the specification for Shard nodes. */ readonly nodeSpec: pulumi.Output; readonly nodes: pulumi.Output; /** * Subscription instance purchase duration. When PeriodUnit is Year, Period can be 1–3. When PeriodUnit is Month, Period can be 1–9. */ readonly period: pulumi.Output; /** * Specify whether the subscription instance is yearly or monthly. Options: Year: yearly. Month: monthly. */ readonly periodUnit: pulumi.Output; /** * String information for the instance's private network connection address. */ readonly privateEndpoint: pulumi.Output; /** * Select the project for the instance. If left blank, the new instance will be added to the default project. */ readonly projectName: pulumi.Output; /** * Number of read-only nodes in the instance */ readonly readOnlyNodeNumber: pulumi.Output; /** * Scheduled recycle time for the instance (UTC) */ readonly reclaimTime: pulumi.Output; /** * Number of shards in the sharded cluster. Range: 2–32. */ readonly shardNumber: pulumi.Output; readonly shards: pulumi.Output; /** * Total storage space for replica set instances, or storage space for a single Shard in a sharded cluster. Unit: GiB, step size: 10. */ readonly storageSpaceGb: pulumi.Output; /** * Instance storage type. Currently, only local SSD disks (LocalSSD) are supported. */ readonly storageType: pulumi.Output; /** * Subnet ID. */ readonly subnetId: pulumi.Output; /** * Database account name. Currently, only the super administrator account can be set when creating an instance. The account name is fixed as root. */ readonly superAccountName: pulumi.Output; /** * Password for the root account. The password must meet the following requirements: Only uppercase and lowercase letters, digits, and the following special characters _#!@$%^&*()+=-. Length: 8–32 characters. Must contain at least three of the following character types: uppercase letters, lowercase letters, digits, or special characters. Weak passwords that are easily cracked (such as Admin@123) are not allowed. */ readonly superAccountPassword: pulumi.Output; readonly tags: pulumi.Output; /** * Instance update time (UTC). */ readonly updatedTime: pulumi.Output; /** * Private network ID. */ readonly vpcId: pulumi.Output; /** * The ID of the availability zone where the instance is located. If you want to deploy a new instance across multiple availability zones, you can provide three availability zone IDs, separated by English commas (,). */ readonly zoneId: pulumi.Output; /** * Create a Instance 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: InstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Instance resources. */ export interface InstanceState { /** * Allowlist ID list. New instances are bound to the specified allowlist. */ allowListIds?: pulumi.Input[]>; /** * Enable auto-renewal. Options: false (default): auto-renewal disabled. true: auto-renewal enabled. */ autoRenew?: pulumi.Input; /** * Instance billing status. Valid values: Normal: normal. WaitingPaid: waiting for payment. ChangingPayType: changing billing type. Renewing: renewing. Overdue: overdue. Owing: owing. Unsubscribing: unsubscribing. */ chargeStatus?: pulumi.Input; /** * Instance billing type. Options: PostPaid (default): pay-as-you-go (also called postpaid). Prepaid: subscription (also called prepaid). */ chargeType?: pulumi.Input; /** * Scheduled shutdown time (UTC). */ closedTime?: pulumi.Input; /** * ConfigServer node specification code in the sharded cluster. Default: mongo.config.1c2g. */ configServerNodeSpec?: pulumi.Input; /** * ConfigServer storage space in the sharded cluster, unit: GiB. Step size: 10. Default: 20. */ configServerStorageSpaceGb?: pulumi.Input; configServers?: pulumi.Input[]>; /** * ConfigServer ID */ configServersId?: pulumi.Input; /** * Instance creation time (UTC). */ createdTime?: pulumi.Input; /** * Database engine. The value is fixed as MongoDB */ dbEngine?: pulumi.Input; /** * Database engine version. Options: MongoDB*4*0 (default): MongoDB 4.0. MongoDB*4*2: MongoDB 4.2. MongoDB*4*4: MongoDB 4.4. MongoDB*5*0: MongoDB 5.0. MongoDB*6*0: MongoDB 6.0. MongoDB*7*0: MongoDB 7.0. */ dbEngineVersion?: pulumi.Input; /** * Database engine version string */ dbEngineVersionStr?: pulumi.Input; /** * Instance expiration time (UTC). */ expiredTime?: pulumi.Input; /** * Number of instances to create. Must be a positive integer greater than or equal to 1. Default is 1. */ instanceCount?: pulumi.Input; /** * Instance ID. */ instanceId?: pulumi.Input; /** * Instance name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 2–64 characters. */ instanceName?: pulumi.Input; instanceParameters?: pulumi.Input[]>; /** * Instance status. Creating: Creating. Running: Running. Allowlist maintenance: AllowListMaintaining. Scaling: Scaling. Restarting: Restarting. Network maintaining: NetworkMaintaining. Restoring: Restoring. Upgrading: Upgrading. Unavailable: Unavailable. Closing: Closing. Deleting: Deleting. Closed: Closed. SSL updating: SSLUpdating. Switch mastering: SwitchMastering. Role changing: RoleChanging. Migrating: Migrating. */ instanceStatus?: pulumi.Input; /** * MongoDB instance type. Valid values: ReplicaSet (default): replica set. ShardedCluster: sharded cluster. */ instanceType?: pulumi.Input; mongos?: pulumi.Input[]>; /** * Mongos ID. */ mongosId?: pulumi.Input; /** * Number of Mongos nodes in the sharded cluster. Range: 2~32. */ mongosNodeNumber?: pulumi.Input; /** * Specification code for Mongos nodes in a sharded cluster. */ mongosNodeSpec?: pulumi.Input; nodeAvailabilityZones?: pulumi.Input[]>; /** * Node count. When the instance type is ReplicaSet, this parameter indicates the number of compute nodes in the replica set instance. When the instance type is ShardedCluster, it indicates the number of nodes in each shard. */ nodeNumber?: pulumi.Input; /** * Instance specification code. When the instance type is ReplicaSet (InstanceType is ReplicaSet), this parameter specifies the compute node specification for the replica set instance. When the instance type is ShardedCluster (InstanceType is ShardedCluster), this parameter specifies the specification for Shard nodes. */ nodeSpec?: pulumi.Input; nodes?: pulumi.Input[]>; /** * Subscription instance purchase duration. When PeriodUnit is Year, Period can be 1–3. When PeriodUnit is Month, Period can be 1–9. */ period?: pulumi.Input; /** * Specify whether the subscription instance is yearly or monthly. Options: Year: yearly. Month: monthly. */ periodUnit?: pulumi.Input; /** * String information for the instance's private network connection address. */ privateEndpoint?: pulumi.Input; /** * Select the project for the instance. If left blank, the new instance will be added to the default project. */ projectName?: pulumi.Input; /** * Number of read-only nodes in the instance */ readOnlyNodeNumber?: pulumi.Input; /** * Scheduled recycle time for the instance (UTC) */ reclaimTime?: pulumi.Input; /** * Number of shards in the sharded cluster. Range: 2–32. */ shardNumber?: pulumi.Input; shards?: pulumi.Input[]>; /** * Total storage space for replica set instances, or storage space for a single Shard in a sharded cluster. Unit: GiB, step size: 10. */ storageSpaceGb?: pulumi.Input; /** * Instance storage type. Currently, only local SSD disks (LocalSSD) are supported. */ storageType?: pulumi.Input; /** * Subnet ID. */ subnetId?: pulumi.Input; /** * Database account name. Currently, only the super administrator account can be set when creating an instance. The account name is fixed as root. */ superAccountName?: pulumi.Input; /** * Password for the root account. The password must meet the following requirements: Only uppercase and lowercase letters, digits, and the following special characters _#!@$%^&*()+=-. Length: 8–32 characters. Must contain at least three of the following character types: uppercase letters, lowercase letters, digits, or special characters. Weak passwords that are easily cracked (such as Admin@123) are not allowed. */ superAccountPassword?: pulumi.Input; tags?: pulumi.Input[]>; /** * Instance update time (UTC). */ updatedTime?: pulumi.Input; /** * Private network ID. */ vpcId?: pulumi.Input; /** * The ID of the availability zone where the instance is located. If you want to deploy a new instance across multiple availability zones, you can provide three availability zone IDs, separated by English commas (,). */ zoneId?: pulumi.Input; } /** * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { /** * Allowlist ID list. New instances are bound to the specified allowlist. */ allowListIds?: pulumi.Input[]>; /** * Enable auto-renewal. Options: false (default): auto-renewal disabled. true: auto-renewal enabled. */ autoRenew?: pulumi.Input; /** * Instance billing type. Options: PostPaid (default): pay-as-you-go (also called postpaid). Prepaid: subscription (also called prepaid). */ chargeType?: pulumi.Input; /** * ConfigServer node specification code in the sharded cluster. Default: mongo.config.1c2g. */ configServerNodeSpec?: pulumi.Input; /** * ConfigServer storage space in the sharded cluster, unit: GiB. Step size: 10. Default: 20. */ configServerStorageSpaceGb?: pulumi.Input; /** * Database engine. The value is fixed as MongoDB */ dbEngine?: pulumi.Input; /** * Database engine version. Options: MongoDB*4*0 (default): MongoDB 4.0. MongoDB*4*2: MongoDB 4.2. MongoDB*4*4: MongoDB 4.4. MongoDB*5*0: MongoDB 5.0. MongoDB*6*0: MongoDB 6.0. MongoDB*7*0: MongoDB 7.0. */ dbEngineVersion?: pulumi.Input; /** * Number of instances to create. Must be a positive integer greater than or equal to 1. Default is 1. */ instanceCount?: pulumi.Input; /** * Instance name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 2–64 characters. */ instanceName?: pulumi.Input; instanceParameters?: pulumi.Input[]>; /** * MongoDB instance type. Valid values: ReplicaSet (default): replica set. ShardedCluster: sharded cluster. */ instanceType?: pulumi.Input; /** * Number of Mongos nodes in the sharded cluster. Range: 2~32. */ mongosNodeNumber?: pulumi.Input; /** * Specification code for Mongos nodes in a sharded cluster. */ mongosNodeSpec?: pulumi.Input; nodeAvailabilityZones?: pulumi.Input[]>; /** * Node count. When the instance type is ReplicaSet, this parameter indicates the number of compute nodes in the replica set instance. When the instance type is ShardedCluster, it indicates the number of nodes in each shard. */ nodeNumber?: pulumi.Input; /** * Instance specification code. When the instance type is ReplicaSet (InstanceType is ReplicaSet), this parameter specifies the compute node specification for the replica set instance. When the instance type is ShardedCluster (InstanceType is ShardedCluster), this parameter specifies the specification for Shard nodes. */ nodeSpec: pulumi.Input; /** * Subscription instance purchase duration. When PeriodUnit is Year, Period can be 1–3. When PeriodUnit is Month, Period can be 1–9. */ period?: pulumi.Input; /** * Specify whether the subscription instance is yearly or monthly. Options: Year: yearly. Month: monthly. */ periodUnit?: pulumi.Input; /** * Select the project for the instance. If left blank, the new instance will be added to the default project. */ projectName?: pulumi.Input; /** * Number of shards in the sharded cluster. Range: 2–32. */ shardNumber?: pulumi.Input; /** * Total storage space for replica set instances, or storage space for a single Shard in a sharded cluster. Unit: GiB, step size: 10. */ storageSpaceGb: pulumi.Input; /** * Subnet ID. */ subnetId: pulumi.Input; /** * Database account name. Currently, only the super administrator account can be set when creating an instance. The account name is fixed as root. */ superAccountName?: pulumi.Input; /** * Password for the root account. The password must meet the following requirements: Only uppercase and lowercase letters, digits, and the following special characters _#!@$%^&*()+=-. Length: 8–32 characters. Must contain at least three of the following character types: uppercase letters, lowercase letters, digits, or special characters. Weak passwords that are easily cracked (such as Admin@123) are not allowed. */ superAccountPassword?: pulumi.Input; tags?: pulumi.Input[]>; /** * Private network ID. */ vpcId: pulumi.Input; /** * The ID of the availability zone where the instance is located. If you want to deploy a new instance across multiple availability zones, you can provide three availability zone IDs, separated by English commas (,). */ zoneId: pulumi.Input; }