1. Packages
  2. Volcengine
  3. API Docs
  4. mongodb
  5. Instance
Volcengine v0.0.29 published on Tuesday, Apr 29, 2025 by Volcengine

volcengine.mongodb.Instance

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.29 published on Tuesday, Apr 29, 2025 by Volcengine

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooZones = volcengine.ecs.Zones({});
    const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
        vpcName: "acc-test-vpc",
        cidrBlock: "172.16.0.0/16",
    });
    const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
        subnetName: "acc-test-subnet",
        cidrBlock: "172.16.0.0/24",
        zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
        vpcId: fooVpc.id,
    });
    const fooInstance = new volcengine.mongodb.Instance("fooInstance", {
        zoneIds: [fooZones.then(fooZones => fooZones.zones?.[0]?.id)],
        dbEngineVersion: "MongoDB_4_0",
        instanceType: "ReplicaSet",
        nodeSpec: "mongo.2c4g",
        storageSpaceGb: 20,
        subnetId: fooSubnet.id,
        instanceName: "acc-test-mongodb-replica",
        chargeType: "PostPaid",
        superAccountPassword: "93f0cb0614Aab12",
        projectName: "default",
        tags: [{
            key: "k1",
            value: "v1",
        }],
        nodeAvailabilityZones: [{
            zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
            nodeNumber: 2,
        }],
    });
    //  period_unit = "Month"
    //  period      = 1
    //  auto_renew  = false
    //  ssl_action  = "Close"
    //  lifecycle {
    //    ignore_changes = [
    //      super_account_password,
    //    ]
    //  }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_zones = volcengine.ecs.zones()
    foo_vpc = volcengine.vpc.Vpc("fooVpc",
        vpc_name="acc-test-vpc",
        cidr_block="172.16.0.0/16")
    foo_subnet = volcengine.vpc.Subnet("fooSubnet",
        subnet_name="acc-test-subnet",
        cidr_block="172.16.0.0/24",
        zone_id=foo_zones.zones[0].id,
        vpc_id=foo_vpc.id)
    foo_instance = volcengine.mongodb.Instance("fooInstance",
        zone_ids=[foo_zones.zones[0].id],
        db_engine_version="MongoDB_4_0",
        instance_type="ReplicaSet",
        node_spec="mongo.2c4g",
        storage_space_gb=20,
        subnet_id=foo_subnet.id,
        instance_name="acc-test-mongodb-replica",
        charge_type="PostPaid",
        super_account_password="93f0cb0614Aab12",
        project_name="default",
        tags=[volcengine.mongodb.InstanceTagArgs(
            key="k1",
            value="v1",
        )],
        node_availability_zones=[volcengine.mongodb.InstanceNodeAvailabilityZoneArgs(
            zone_id=foo_zones.zones[0].id,
            node_number=2,
        )])
    #  period_unit = "Month"
    #  period      = 1
    #  auto_renew  = false
    #  ssl_action  = "Close"
    #  lifecycle {
    #    ignore_changes = [
    #      super_account_password,
    #    ]
    #  }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/mongodb"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooZones, err := ecs.Zones(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
    			VpcName:   pulumi.String("acc-test-vpc"),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
    			SubnetName: pulumi.String("acc-test-subnet"),
    			CidrBlock:  pulumi.String("172.16.0.0/24"),
    			ZoneId:     pulumi.String(fooZones.Zones[0].Id),
    			VpcId:      fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mongodb.NewInstance(ctx, "fooInstance", &mongodb.InstanceArgs{
    			ZoneIds: pulumi.StringArray{
    				pulumi.String(fooZones.Zones[0].Id),
    			},
    			DbEngineVersion:      pulumi.String("MongoDB_4_0"),
    			InstanceType:         pulumi.String("ReplicaSet"),
    			NodeSpec:             pulumi.String("mongo.2c4g"),
    			StorageSpaceGb:       pulumi.Int(20),
    			SubnetId:             fooSubnet.ID(),
    			InstanceName:         pulumi.String("acc-test-mongodb-replica"),
    			ChargeType:           pulumi.String("PostPaid"),
    			SuperAccountPassword: pulumi.String("93f0cb0614Aab12"),
    			ProjectName:          pulumi.String("default"),
    			Tags: mongodb.InstanceTagArray{
    				&mongodb.InstanceTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    			NodeAvailabilityZones: mongodb.InstanceNodeAvailabilityZoneArray{
    				&mongodb.InstanceNodeAvailabilityZoneArgs{
    					ZoneId:     pulumi.String(fooZones.Zones[0].Id),
    					NodeNumber: pulumi.Int(2),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooZones = Volcengine.Ecs.Zones.Invoke();
    
        var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
        {
            VpcName = "acc-test-vpc",
            CidrBlock = "172.16.0.0/16",
        });
    
        var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
        {
            SubnetName = "acc-test-subnet",
            CidrBlock = "172.16.0.0/24",
            ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
            VpcId = fooVpc.Id,
        });
    
        var fooInstance = new Volcengine.Mongodb.Instance("fooInstance", new()
        {
            ZoneIds = new[]
            {
                fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
            },
            DbEngineVersion = "MongoDB_4_0",
            InstanceType = "ReplicaSet",
            NodeSpec = "mongo.2c4g",
            StorageSpaceGb = 20,
            SubnetId = fooSubnet.Id,
            InstanceName = "acc-test-mongodb-replica",
            ChargeType = "PostPaid",
            SuperAccountPassword = "93f0cb0614Aab12",
            ProjectName = "default",
            Tags = new[]
            {
                new Volcengine.Mongodb.Inputs.InstanceTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
            NodeAvailabilityZones = new[]
            {
                new Volcengine.Mongodb.Inputs.InstanceNodeAvailabilityZoneArgs
                {
                    ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
                    NodeNumber = 2,
                },
            },
        });
    
        //  period_unit = "Month"
        //  period      = 1
        //  auto_renew  = false
        //  ssl_action  = "Close"
        //  lifecycle {
        //    ignore_changes = [
        //      super_account_password,
        //    ]
        //  }
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.ecs.EcsFunctions;
    import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
    import com.pulumi.volcengine.vpc.Vpc;
    import com.pulumi.volcengine.vpc.VpcArgs;
    import com.pulumi.volcengine.vpc.Subnet;
    import com.pulumi.volcengine.vpc.SubnetArgs;
    import com.pulumi.volcengine.mongodb.Instance;
    import com.pulumi.volcengine.mongodb.InstanceArgs;
    import com.pulumi.volcengine.mongodb.inputs.InstanceTagArgs;
    import com.pulumi.volcengine.mongodb.inputs.InstanceNodeAvailabilityZoneArgs;
    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) {
            final var fooZones = EcsFunctions.Zones();
    
            var fooVpc = new Vpc("fooVpc", VpcArgs.builder()        
                .vpcName("acc-test-vpc")
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()        
                .subnetName("acc-test-subnet")
                .cidrBlock("172.16.0.0/24")
                .zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
                .vpcId(fooVpc.id())
                .build());
    
            var fooInstance = new Instance("fooInstance", InstanceArgs.builder()        
                .zoneIds(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
                .dbEngineVersion("MongoDB_4_0")
                .instanceType("ReplicaSet")
                .nodeSpec("mongo.2c4g")
                .storageSpaceGb(20)
                .subnetId(fooSubnet.id())
                .instanceName("acc-test-mongodb-replica")
                .chargeType("PostPaid")
                .superAccountPassword("93f0cb0614Aab12")
                .projectName("default")
                .tags(InstanceTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .nodeAvailabilityZones(InstanceNodeAvailabilityZoneArgs.builder()
                    .zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
                    .nodeNumber(2)
                    .build())
                .build());
    
            //  period_unit = "Month"
            //  period      = 1
            //  auto_renew  = false
            //  ssl_action  = "Close"
            //  lifecycle {
            //    ignore_changes = [
            //      super_account_password,
            //    ]
            //  }
        }
    }
    
    resources:
      fooVpc:
        type: volcengine:vpc:Vpc
        properties:
          vpcName: acc-test-vpc
          cidrBlock: 172.16.0.0/16
      fooSubnet:
        type: volcengine:vpc:Subnet
        properties:
          subnetName: acc-test-subnet
          cidrBlock: 172.16.0.0/24
          zoneId: ${fooZones.zones[0].id}
          vpcId: ${fooVpc.id}
      fooInstance:
        type: volcengine:mongodb:Instance
        properties:
          zoneIds:
            - ${fooZones.zones[0].id}
          dbEngineVersion: MongoDB_4_0
          instanceType: ReplicaSet
          nodeSpec: mongo.2c4g
          #  mongos_node_spec       = "mongo.mongos.2c4g"
          #   #  mongos_node_number     = 3
          #   #  shard_number           = 3
          storageSpaceGb: 20
          subnetId: ${fooSubnet.id}
          instanceName: acc-test-mongodb-replica
          chargeType: PostPaid
          superAccountPassword: 93f0cb0614Aab12
          projectName: default
          tags:
            - key: k1
              value: v1
          nodeAvailabilityZones:
            - zoneId: ${fooZones.zones[0].id}
              nodeNumber: 2
    variables:
      fooZones:
        fn::invoke:
          Function: volcengine:ecs:Zones
          Arguments: {}
    

    Create Instance Resource

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

    Constructor syntax

    new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
    @overload
    def Instance(resource_name: str,
                 args: InstanceArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Instance(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 node_spec: Optional[str] = None,
                 subnet_id: Optional[str] = None,
                 storage_space_gb: Optional[int] = None,
                 period_unit: Optional[str] = None,
                 shard_number: Optional[int] = None,
                 mongos_node_number: Optional[int] = None,
                 mongos_node_spec: Optional[str] = None,
                 node_availability_zones: Optional[Sequence[InstanceNodeAvailabilityZoneArgs]] = None,
                 instance_name: Optional[str] = None,
                 period: Optional[int] = None,
                 auto_renew: Optional[bool] = None,
                 project_name: Optional[str] = None,
                 instance_type: Optional[str] = None,
                 db_engine_version: Optional[str] = None,
                 charge_type: Optional[str] = None,
                 super_account_password: Optional[str] = None,
                 tags: Optional[Sequence[InstanceTagArgs]] = None,
                 vpc_id: Optional[str] = None,
                 zone_id: Optional[str] = None,
                 zone_ids: Optional[Sequence[str]] = None)
    func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
    public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
    public Instance(String name, InstanceArgs args)
    public Instance(String name, InstanceArgs args, CustomResourceOptions options)
    
    type: volcengine:mongodb:Instance
    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 InstanceArgs
    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 InstanceArgs
    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 InstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceArgs
    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 exampleinstanceResourceResourceFromMongodbinstance = new Volcengine.Mongodb.Instance("exampleinstanceResourceResourceFromMongodbinstance", new()
    {
        NodeSpec = "string",
        SubnetId = "string",
        StorageSpaceGb = 0,
        PeriodUnit = "string",
        ShardNumber = 0,
        MongosNodeNumber = 0,
        MongosNodeSpec = "string",
        NodeAvailabilityZones = new[]
        {
            new Volcengine.Mongodb.Inputs.InstanceNodeAvailabilityZoneArgs
            {
                NodeNumber = 0,
                ZoneId = "string",
            },
        },
        InstanceName = "string",
        Period = 0,
        AutoRenew = false,
        ProjectName = "string",
        InstanceType = "string",
        DbEngineVersion = "string",
        ChargeType = "string",
        SuperAccountPassword = "string",
        Tags = new[]
        {
            new Volcengine.Mongodb.Inputs.InstanceTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        VpcId = "string",
        ZoneIds = new[]
        {
            "string",
        },
    });
    
    example, err := mongodb.NewInstance(ctx, "exampleinstanceResourceResourceFromMongodbinstance", &mongodb.InstanceArgs{
    	NodeSpec:         pulumi.String("string"),
    	SubnetId:         pulumi.String("string"),
    	StorageSpaceGb:   pulumi.Int(0),
    	PeriodUnit:       pulumi.String("string"),
    	ShardNumber:      pulumi.Int(0),
    	MongosNodeNumber: pulumi.Int(0),
    	MongosNodeSpec:   pulumi.String("string"),
    	NodeAvailabilityZones: mongodb.InstanceNodeAvailabilityZoneArray{
    		&mongodb.InstanceNodeAvailabilityZoneArgs{
    			NodeNumber: pulumi.Int(0),
    			ZoneId:     pulumi.String("string"),
    		},
    	},
    	InstanceName:         pulumi.String("string"),
    	Period:               pulumi.Int(0),
    	AutoRenew:            pulumi.Bool(false),
    	ProjectName:          pulumi.String("string"),
    	InstanceType:         pulumi.String("string"),
    	DbEngineVersion:      pulumi.String("string"),
    	ChargeType:           pulumi.String("string"),
    	SuperAccountPassword: pulumi.String("string"),
    	Tags: mongodb.InstanceTagArray{
    		&mongodb.InstanceTagArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	VpcId: pulumi.String("string"),
    	ZoneIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var exampleinstanceResourceResourceFromMongodbinstance = new com.pulumi.volcengine.mongodb.Instance("exampleinstanceResourceResourceFromMongodbinstance", com.pulumi.volcengine.mongodb.InstanceArgs.builder()
        .nodeSpec("string")
        .subnetId("string")
        .storageSpaceGb(0)
        .periodUnit("string")
        .shardNumber(0)
        .mongosNodeNumber(0)
        .mongosNodeSpec("string")
        .nodeAvailabilityZones(InstanceNodeAvailabilityZoneArgs.builder()
            .nodeNumber(0)
            .zoneId("string")
            .build())
        .instanceName("string")
        .period(0)
        .autoRenew(false)
        .projectName("string")
        .instanceType("string")
        .dbEngineVersion("string")
        .chargeType("string")
        .superAccountPassword("string")
        .tags(InstanceTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .vpcId("string")
        .zoneIds("string")
        .build());
    
    exampleinstance_resource_resource_from_mongodbinstance = volcengine.mongodb.Instance("exampleinstanceResourceResourceFromMongodbinstance",
        node_spec="string",
        subnet_id="string",
        storage_space_gb=0,
        period_unit="string",
        shard_number=0,
        mongos_node_number=0,
        mongos_node_spec="string",
        node_availability_zones=[{
            "node_number": 0,
            "zone_id": "string",
        }],
        instance_name="string",
        period=0,
        auto_renew=False,
        project_name="string",
        instance_type="string",
        db_engine_version="string",
        charge_type="string",
        super_account_password="string",
        tags=[{
            "key": "string",
            "value": "string",
        }],
        vpc_id="string",
        zone_ids=["string"])
    
    const exampleinstanceResourceResourceFromMongodbinstance = new volcengine.mongodb.Instance("exampleinstanceResourceResourceFromMongodbinstance", {
        nodeSpec: "string",
        subnetId: "string",
        storageSpaceGb: 0,
        periodUnit: "string",
        shardNumber: 0,
        mongosNodeNumber: 0,
        mongosNodeSpec: "string",
        nodeAvailabilityZones: [{
            nodeNumber: 0,
            zoneId: "string",
        }],
        instanceName: "string",
        period: 0,
        autoRenew: false,
        projectName: "string",
        instanceType: "string",
        dbEngineVersion: "string",
        chargeType: "string",
        superAccountPassword: "string",
        tags: [{
            key: "string",
            value: "string",
        }],
        vpcId: "string",
        zoneIds: ["string"],
    });
    
    type: volcengine:mongodb:Instance
    properties:
        autoRenew: false
        chargeType: string
        dbEngineVersion: string
        instanceName: string
        instanceType: string
        mongosNodeNumber: 0
        mongosNodeSpec: string
        nodeAvailabilityZones:
            - nodeNumber: 0
              zoneId: string
        nodeSpec: string
        period: 0
        periodUnit: string
        projectName: string
        shardNumber: 0
        storageSpaceGb: 0
        subnetId: string
        superAccountPassword: string
        tags:
            - key: string
              value: string
        vpcId: string
        zoneIds:
            - string
    

    Instance 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 Instance resource accepts the following input properties:

    NodeSpec string
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    StorageSpaceGb int
    The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster. Unit: GiB.
    SubnetId string
    The subnet id of instance.
    AutoRenew bool
    Whether to enable automatic renewal. This parameter is required when the ChargeType is Prepaid.
    ChargeType string
    The charge type of instance, valid value contains Prepaid or PostPaid. Default is PostPaid.
    DbEngineVersion string
    The version of db engine, valid value contains MongoDB_4_0, MongoDB_4_2, MongoDB_4_4, MongoDB_5_0, MongoDB_6_0.
    InstanceName string
    The instance name.
    InstanceType string
    The type of instance, the valid value contains ReplicaSet or ShardedCluster. Default is ReplicaSet.
    MongosNodeNumber int
    The mongos node number of shard cluster, value range is 2~23, this parameter is required when the InstanceType is ShardedCluster.
    MongosNodeSpec string
    The mongos node spec of shard cluster, this parameter is required when the InstanceType is ShardedCluster.
    NodeAvailabilityZones List<InstanceNodeAvailabilityZone>
    The readonly node of the instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Period int
    The instance purchase duration, the value range is 1~3 when PeriodUtil is Year, the value range is 1~9 when PeriodUtil is Month. This parameter is required when the ChargeType is Prepaid.
    PeriodUnit string
    The period unit, valid value contains Year or Month. This parameter is required when the ChargeType is Prepaid.
    ProjectName string
    The project name to which the instance belongs.
    ShardNumber int
    The number of shards in shard cluster, value range is 2~32, this parameter is required when the InstanceType is ShardedCluster.
    SuperAccountPassword string
    The password of database account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Tags List<InstanceTag>
    Tags.
    VpcId string
    The vpc ID.
    ZoneId string
    This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones. The zone ID of instance.

    Deprecated: This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones.

    ZoneIds List<string>
    The list of zone ids. If you need to deploy multiple availability zones for a newly created instance, you can specify three availability zone IDs at the same time. By default, the first available zone passed in is the primary available zone, and the two available zones passed in afterwards are the backup available zones.
    NodeSpec string
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    StorageSpaceGb int
    The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster. Unit: GiB.
    SubnetId string
    The subnet id of instance.
    AutoRenew bool
    Whether to enable automatic renewal. This parameter is required when the ChargeType is Prepaid.
    ChargeType string
    The charge type of instance, valid value contains Prepaid or PostPaid. Default is PostPaid.
    DbEngineVersion string
    The version of db engine, valid value contains MongoDB_4_0, MongoDB_4_2, MongoDB_4_4, MongoDB_5_0, MongoDB_6_0.
    InstanceName string
    The instance name.
    InstanceType string
    The type of instance, the valid value contains ReplicaSet or ShardedCluster. Default is ReplicaSet.
    MongosNodeNumber int
    The mongos node number of shard cluster, value range is 2~23, this parameter is required when the InstanceType is ShardedCluster.
    MongosNodeSpec string
    The mongos node spec of shard cluster, this parameter is required when the InstanceType is ShardedCluster.
    NodeAvailabilityZones []InstanceNodeAvailabilityZoneArgs
    The readonly node of the instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Period int
    The instance purchase duration, the value range is 1~3 when PeriodUtil is Year, the value range is 1~9 when PeriodUtil is Month. This parameter is required when the ChargeType is Prepaid.
    PeriodUnit string
    The period unit, valid value contains Year or Month. This parameter is required when the ChargeType is Prepaid.
    ProjectName string
    The project name to which the instance belongs.
    ShardNumber int
    The number of shards in shard cluster, value range is 2~32, this parameter is required when the InstanceType is ShardedCluster.
    SuperAccountPassword string
    The password of database account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Tags []InstanceTagArgs
    Tags.
    VpcId string
    The vpc ID.
    ZoneId string
    This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones. The zone ID of instance.

    Deprecated: This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones.

    ZoneIds []string
    The list of zone ids. If you need to deploy multiple availability zones for a newly created instance, you can specify three availability zone IDs at the same time. By default, the first available zone passed in is the primary available zone, and the two available zones passed in afterwards are the backup available zones.
    nodeSpec String
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    storageSpaceGb Integer
    The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster. Unit: GiB.
    subnetId String
    The subnet id of instance.
    autoRenew Boolean
    Whether to enable automatic renewal. This parameter is required when the ChargeType is Prepaid.
    chargeType String
    The charge type of instance, valid value contains Prepaid or PostPaid. Default is PostPaid.
    dbEngineVersion String
    The version of db engine, valid value contains MongoDB_4_0, MongoDB_4_2, MongoDB_4_4, MongoDB_5_0, MongoDB_6_0.
    instanceName String
    The instance name.
    instanceType String
    The type of instance, the valid value contains ReplicaSet or ShardedCluster. Default is ReplicaSet.
    mongosNodeNumber Integer
    The mongos node number of shard cluster, value range is 2~23, this parameter is required when the InstanceType is ShardedCluster.
    mongosNodeSpec String
    The mongos node spec of shard cluster, this parameter is required when the InstanceType is ShardedCluster.
    nodeAvailabilityZones List<InstanceNodeAvailabilityZone>
    The readonly node of the instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    period Integer
    The instance purchase duration, the value range is 1~3 when PeriodUtil is Year, the value range is 1~9 when PeriodUtil is Month. This parameter is required when the ChargeType is Prepaid.
    periodUnit String
    The period unit, valid value contains Year or Month. This parameter is required when the ChargeType is Prepaid.
    projectName String
    The project name to which the instance belongs.
    shardNumber Integer
    The number of shards in shard cluster, value range is 2~32, this parameter is required when the InstanceType is ShardedCluster.
    superAccountPassword String
    The password of database account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    tags List<InstanceTag>
    Tags.
    vpcId String
    The vpc ID.
    zoneId String
    This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones. The zone ID of instance.

    Deprecated: This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones.

    zoneIds List<String>
    The list of zone ids. If you need to deploy multiple availability zones for a newly created instance, you can specify three availability zone IDs at the same time. By default, the first available zone passed in is the primary available zone, and the two available zones passed in afterwards are the backup available zones.
    nodeSpec string
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    storageSpaceGb number
    The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster. Unit: GiB.
    subnetId string
    The subnet id of instance.
    autoRenew boolean
    Whether to enable automatic renewal. This parameter is required when the ChargeType is Prepaid.
    chargeType string
    The charge type of instance, valid value contains Prepaid or PostPaid. Default is PostPaid.
    dbEngineVersion string
    The version of db engine, valid value contains MongoDB_4_0, MongoDB_4_2, MongoDB_4_4, MongoDB_5_0, MongoDB_6_0.
    instanceName string
    The instance name.
    instanceType string
    The type of instance, the valid value contains ReplicaSet or ShardedCluster. Default is ReplicaSet.
    mongosNodeNumber number
    The mongos node number of shard cluster, value range is 2~23, this parameter is required when the InstanceType is ShardedCluster.
    mongosNodeSpec string
    The mongos node spec of shard cluster, this parameter is required when the InstanceType is ShardedCluster.
    nodeAvailabilityZones InstanceNodeAvailabilityZone[]
    The readonly node of the instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    period number
    The instance purchase duration, the value range is 1~3 when PeriodUtil is Year, the value range is 1~9 when PeriodUtil is Month. This parameter is required when the ChargeType is Prepaid.
    periodUnit string
    The period unit, valid value contains Year or Month. This parameter is required when the ChargeType is Prepaid.
    projectName string
    The project name to which the instance belongs.
    shardNumber number
    The number of shards in shard cluster, value range is 2~32, this parameter is required when the InstanceType is ShardedCluster.
    superAccountPassword string
    The password of database account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    tags InstanceTag[]
    Tags.
    vpcId string
    The vpc ID.
    zoneId string
    This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones. The zone ID of instance.

    Deprecated: This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones.

    zoneIds string[]
    The list of zone ids. If you need to deploy multiple availability zones for a newly created instance, you can specify three availability zone IDs at the same time. By default, the first available zone passed in is the primary available zone, and the two available zones passed in afterwards are the backup available zones.
    node_spec str
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    storage_space_gb int
    The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster. Unit: GiB.
    subnet_id str
    The subnet id of instance.
    auto_renew bool
    Whether to enable automatic renewal. This parameter is required when the ChargeType is Prepaid.
    charge_type str
    The charge type of instance, valid value contains Prepaid or PostPaid. Default is PostPaid.
    db_engine_version str
    The version of db engine, valid value contains MongoDB_4_0, MongoDB_4_2, MongoDB_4_4, MongoDB_5_0, MongoDB_6_0.
    instance_name str
    The instance name.
    instance_type str
    The type of instance, the valid value contains ReplicaSet or ShardedCluster. Default is ReplicaSet.
    mongos_node_number int
    The mongos node number of shard cluster, value range is 2~23, this parameter is required when the InstanceType is ShardedCluster.
    mongos_node_spec str
    The mongos node spec of shard cluster, this parameter is required when the InstanceType is ShardedCluster.
    node_availability_zones Sequence[InstanceNodeAvailabilityZoneArgs]
    The readonly node of the instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    period int
    The instance purchase duration, the value range is 1~3 when PeriodUtil is Year, the value range is 1~9 when PeriodUtil is Month. This parameter is required when the ChargeType is Prepaid.
    period_unit str
    The period unit, valid value contains Year or Month. This parameter is required when the ChargeType is Prepaid.
    project_name str
    The project name to which the instance belongs.
    shard_number int
    The number of shards in shard cluster, value range is 2~32, this parameter is required when the InstanceType is ShardedCluster.
    super_account_password str
    The password of database account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    tags Sequence[InstanceTagArgs]
    Tags.
    vpc_id str
    The vpc ID.
    zone_id str
    This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones. The zone ID of instance.

    Deprecated: This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones.

    zone_ids Sequence[str]
    The list of zone ids. If you need to deploy multiple availability zones for a newly created instance, you can specify three availability zone IDs at the same time. By default, the first available zone passed in is the primary available zone, and the two available zones passed in afterwards are the backup available zones.
    nodeSpec String
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    storageSpaceGb Number
    The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster. Unit: GiB.
    subnetId String
    The subnet id of instance.
    autoRenew Boolean
    Whether to enable automatic renewal. This parameter is required when the ChargeType is Prepaid.
    chargeType String
    The charge type of instance, valid value contains Prepaid or PostPaid. Default is PostPaid.
    dbEngineVersion String
    The version of db engine, valid value contains MongoDB_4_0, MongoDB_4_2, MongoDB_4_4, MongoDB_5_0, MongoDB_6_0.
    instanceName String
    The instance name.
    instanceType String
    The type of instance, the valid value contains ReplicaSet or ShardedCluster. Default is ReplicaSet.
    mongosNodeNumber Number
    The mongos node number of shard cluster, value range is 2~23, this parameter is required when the InstanceType is ShardedCluster.
    mongosNodeSpec String
    The mongos node spec of shard cluster, this parameter is required when the InstanceType is ShardedCluster.
    nodeAvailabilityZones List<Property Map>
    The readonly node of the instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    period Number
    The instance purchase duration, the value range is 1~3 when PeriodUtil is Year, the value range is 1~9 when PeriodUtil is Month. This parameter is required when the ChargeType is Prepaid.
    periodUnit String
    The period unit, valid value contains Year or Month. This parameter is required when the ChargeType is Prepaid.
    projectName String
    The project name to which the instance belongs.
    shardNumber Number
    The number of shards in shard cluster, value range is 2~32, this parameter is required when the InstanceType is ShardedCluster.
    superAccountPassword String
    The password of database account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    tags List<Property Map>
    Tags.
    vpcId String
    The vpc ID.
    zoneId String
    This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones. The zone ID of instance.

    Deprecated: This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones.

    zoneIds List<String>
    The list of zone ids. If you need to deploy multiple availability zones for a newly created instance, you can specify three availability zone IDs at the same time. By default, the first available zone passed in is the primary available zone, and the two available zones passed in afterwards are the backup available zones.

    Outputs

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

    ConfigServersId string
    The config servers id of the ShardedCluster instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Mongos List<InstanceMongo>
    The mongos information of the ShardedCluster instance.
    MongosId string
    The mongos id of the ShardedCluster instance.
    PrivateEndpoint string
    The private endpoint address of instance.
    ReadOnlyNodeNumber int
    The number of readonly node in instance.
    Shards List<InstanceShard>
    The shards information of the ShardedCluster instance.
    ConfigServersId string
    The config servers id of the ShardedCluster instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Mongos []InstanceMongo
    The mongos information of the ShardedCluster instance.
    MongosId string
    The mongos id of the ShardedCluster instance.
    PrivateEndpoint string
    The private endpoint address of instance.
    ReadOnlyNodeNumber int
    The number of readonly node in instance.
    Shards []InstanceShard
    The shards information of the ShardedCluster instance.
    configServersId String
    The config servers id of the ShardedCluster instance.
    id String
    The provider-assigned unique ID for this managed resource.
    mongos List<InstanceMongo>
    The mongos information of the ShardedCluster instance.
    mongosId String
    The mongos id of the ShardedCluster instance.
    privateEndpoint String
    The private endpoint address of instance.
    readOnlyNodeNumber Integer
    The number of readonly node in instance.
    shards List<InstanceShard>
    The shards information of the ShardedCluster instance.
    configServersId string
    The config servers id of the ShardedCluster instance.
    id string
    The provider-assigned unique ID for this managed resource.
    mongos InstanceMongo[]
    The mongos information of the ShardedCluster instance.
    mongosId string
    The mongos id of the ShardedCluster instance.
    privateEndpoint string
    The private endpoint address of instance.
    readOnlyNodeNumber number
    The number of readonly node in instance.
    shards InstanceShard[]
    The shards information of the ShardedCluster instance.
    config_servers_id str
    The config servers id of the ShardedCluster instance.
    id str
    The provider-assigned unique ID for this managed resource.
    mongos Sequence[InstanceMongo]
    The mongos information of the ShardedCluster instance.
    mongos_id str
    The mongos id of the ShardedCluster instance.
    private_endpoint str
    The private endpoint address of instance.
    read_only_node_number int
    The number of readonly node in instance.
    shards Sequence[InstanceShard]
    The shards information of the ShardedCluster instance.
    configServersId String
    The config servers id of the ShardedCluster instance.
    id String
    The provider-assigned unique ID for this managed resource.
    mongos List<Property Map>
    The mongos information of the ShardedCluster instance.
    mongosId String
    The mongos id of the ShardedCluster instance.
    privateEndpoint String
    The private endpoint address of instance.
    readOnlyNodeNumber Number
    The number of readonly node in instance.
    shards List<Property Map>
    The shards information of the ShardedCluster instance.

    Look up Existing Instance Resource

    Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_renew: Optional[bool] = None,
            charge_type: Optional[str] = None,
            config_servers_id: Optional[str] = None,
            db_engine_version: Optional[str] = None,
            instance_name: Optional[str] = None,
            instance_type: Optional[str] = None,
            mongos: Optional[Sequence[InstanceMongoArgs]] = None,
            mongos_id: Optional[str] = None,
            mongos_node_number: Optional[int] = None,
            mongos_node_spec: Optional[str] = None,
            node_availability_zones: Optional[Sequence[InstanceNodeAvailabilityZoneArgs]] = None,
            node_spec: Optional[str] = None,
            period: Optional[int] = None,
            period_unit: Optional[str] = None,
            private_endpoint: Optional[str] = None,
            project_name: Optional[str] = None,
            read_only_node_number: Optional[int] = None,
            shard_number: Optional[int] = None,
            shards: Optional[Sequence[InstanceShardArgs]] = None,
            storage_space_gb: Optional[int] = None,
            subnet_id: Optional[str] = None,
            super_account_password: Optional[str] = None,
            tags: Optional[Sequence[InstanceTagArgs]] = None,
            vpc_id: Optional[str] = None,
            zone_id: Optional[str] = None,
            zone_ids: Optional[Sequence[str]] = None) -> Instance
    func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
    public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
    public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:mongodb:Instance    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AutoRenew bool
    Whether to enable automatic renewal. This parameter is required when the ChargeType is Prepaid.
    ChargeType string
    The charge type of instance, valid value contains Prepaid or PostPaid. Default is PostPaid.
    ConfigServersId string
    The config servers id of the ShardedCluster instance.
    DbEngineVersion string
    The version of db engine, valid value contains MongoDB_4_0, MongoDB_4_2, MongoDB_4_4, MongoDB_5_0, MongoDB_6_0.
    InstanceName string
    The instance name.
    InstanceType string
    The type of instance, the valid value contains ReplicaSet or ShardedCluster. Default is ReplicaSet.
    Mongos List<InstanceMongo>
    The mongos information of the ShardedCluster instance.
    MongosId string
    The mongos id of the ShardedCluster instance.
    MongosNodeNumber int
    The mongos node number of shard cluster, value range is 2~23, this parameter is required when the InstanceType is ShardedCluster.
    MongosNodeSpec string
    The mongos node spec of shard cluster, this parameter is required when the InstanceType is ShardedCluster.
    NodeAvailabilityZones List<InstanceNodeAvailabilityZone>
    The readonly node of the instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    NodeSpec string
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    Period int
    The instance purchase duration, the value range is 1~3 when PeriodUtil is Year, the value range is 1~9 when PeriodUtil is Month. This parameter is required when the ChargeType is Prepaid.
    PeriodUnit string
    The period unit, valid value contains Year or Month. This parameter is required when the ChargeType is Prepaid.
    PrivateEndpoint string
    The private endpoint address of instance.
    ProjectName string
    The project name to which the instance belongs.
    ReadOnlyNodeNumber int
    The number of readonly node in instance.
    ShardNumber int
    The number of shards in shard cluster, value range is 2~32, this parameter is required when the InstanceType is ShardedCluster.
    Shards List<InstanceShard>
    The shards information of the ShardedCluster instance.
    StorageSpaceGb int
    The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster. Unit: GiB.
    SubnetId string
    The subnet id of instance.
    SuperAccountPassword string
    The password of database account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Tags List<InstanceTag>
    Tags.
    VpcId string
    The vpc ID.
    ZoneId string
    This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones. The zone ID of instance.

    Deprecated: This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones.

    ZoneIds List<string>
    The list of zone ids. If you need to deploy multiple availability zones for a newly created instance, you can specify three availability zone IDs at the same time. By default, the first available zone passed in is the primary available zone, and the two available zones passed in afterwards are the backup available zones.
    AutoRenew bool
    Whether to enable automatic renewal. This parameter is required when the ChargeType is Prepaid.
    ChargeType string
    The charge type of instance, valid value contains Prepaid or PostPaid. Default is PostPaid.
    ConfigServersId string
    The config servers id of the ShardedCluster instance.
    DbEngineVersion string
    The version of db engine, valid value contains MongoDB_4_0, MongoDB_4_2, MongoDB_4_4, MongoDB_5_0, MongoDB_6_0.
    InstanceName string
    The instance name.
    InstanceType string
    The type of instance, the valid value contains ReplicaSet or ShardedCluster. Default is ReplicaSet.
    Mongos []InstanceMongoArgs
    The mongos information of the ShardedCluster instance.
    MongosId string
    The mongos id of the ShardedCluster instance.
    MongosNodeNumber int
    The mongos node number of shard cluster, value range is 2~23, this parameter is required when the InstanceType is ShardedCluster.
    MongosNodeSpec string
    The mongos node spec of shard cluster, this parameter is required when the InstanceType is ShardedCluster.
    NodeAvailabilityZones []InstanceNodeAvailabilityZoneArgs
    The readonly node of the instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    NodeSpec string
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    Period int
    The instance purchase duration, the value range is 1~3 when PeriodUtil is Year, the value range is 1~9 when PeriodUtil is Month. This parameter is required when the ChargeType is Prepaid.
    PeriodUnit string
    The period unit, valid value contains Year or Month. This parameter is required when the ChargeType is Prepaid.
    PrivateEndpoint string
    The private endpoint address of instance.
    ProjectName string
    The project name to which the instance belongs.
    ReadOnlyNodeNumber int
    The number of readonly node in instance.
    ShardNumber int
    The number of shards in shard cluster, value range is 2~32, this parameter is required when the InstanceType is ShardedCluster.
    Shards []InstanceShardArgs
    The shards information of the ShardedCluster instance.
    StorageSpaceGb int
    The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster. Unit: GiB.
    SubnetId string
    The subnet id of instance.
    SuperAccountPassword string
    The password of database account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Tags []InstanceTagArgs
    Tags.
    VpcId string
    The vpc ID.
    ZoneId string
    This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones. The zone ID of instance.

    Deprecated: This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones.

    ZoneIds []string
    The list of zone ids. If you need to deploy multiple availability zones for a newly created instance, you can specify three availability zone IDs at the same time. By default, the first available zone passed in is the primary available zone, and the two available zones passed in afterwards are the backup available zones.
    autoRenew Boolean
    Whether to enable automatic renewal. This parameter is required when the ChargeType is Prepaid.
    chargeType String
    The charge type of instance, valid value contains Prepaid or PostPaid. Default is PostPaid.
    configServersId String
    The config servers id of the ShardedCluster instance.
    dbEngineVersion String
    The version of db engine, valid value contains MongoDB_4_0, MongoDB_4_2, MongoDB_4_4, MongoDB_5_0, MongoDB_6_0.
    instanceName String
    The instance name.
    instanceType String
    The type of instance, the valid value contains ReplicaSet or ShardedCluster. Default is ReplicaSet.
    mongos List<InstanceMongo>
    The mongos information of the ShardedCluster instance.
    mongosId String
    The mongos id of the ShardedCluster instance.
    mongosNodeNumber Integer
    The mongos node number of shard cluster, value range is 2~23, this parameter is required when the InstanceType is ShardedCluster.
    mongosNodeSpec String
    The mongos node spec of shard cluster, this parameter is required when the InstanceType is ShardedCluster.
    nodeAvailabilityZones List<InstanceNodeAvailabilityZone>
    The readonly node of the instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    nodeSpec String
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    period Integer
    The instance purchase duration, the value range is 1~3 when PeriodUtil is Year, the value range is 1~9 when PeriodUtil is Month. This parameter is required when the ChargeType is Prepaid.
    periodUnit String
    The period unit, valid value contains Year or Month. This parameter is required when the ChargeType is Prepaid.
    privateEndpoint String
    The private endpoint address of instance.
    projectName String
    The project name to which the instance belongs.
    readOnlyNodeNumber Integer
    The number of readonly node in instance.
    shardNumber Integer
    The number of shards in shard cluster, value range is 2~32, this parameter is required when the InstanceType is ShardedCluster.
    shards List<InstanceShard>
    The shards information of the ShardedCluster instance.
    storageSpaceGb Integer
    The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster. Unit: GiB.
    subnetId String
    The subnet id of instance.
    superAccountPassword String
    The password of database account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    tags List<InstanceTag>
    Tags.
    vpcId String
    The vpc ID.
    zoneId String
    This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones. The zone ID of instance.

    Deprecated: This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones.

    zoneIds List<String>
    The list of zone ids. If you need to deploy multiple availability zones for a newly created instance, you can specify three availability zone IDs at the same time. By default, the first available zone passed in is the primary available zone, and the two available zones passed in afterwards are the backup available zones.
    autoRenew boolean
    Whether to enable automatic renewal. This parameter is required when the ChargeType is Prepaid.
    chargeType string
    The charge type of instance, valid value contains Prepaid or PostPaid. Default is PostPaid.
    configServersId string
    The config servers id of the ShardedCluster instance.
    dbEngineVersion string
    The version of db engine, valid value contains MongoDB_4_0, MongoDB_4_2, MongoDB_4_4, MongoDB_5_0, MongoDB_6_0.
    instanceName string
    The instance name.
    instanceType string
    The type of instance, the valid value contains ReplicaSet or ShardedCluster. Default is ReplicaSet.
    mongos InstanceMongo[]
    The mongos information of the ShardedCluster instance.
    mongosId string
    The mongos id of the ShardedCluster instance.
    mongosNodeNumber number
    The mongos node number of shard cluster, value range is 2~23, this parameter is required when the InstanceType is ShardedCluster.
    mongosNodeSpec string
    The mongos node spec of shard cluster, this parameter is required when the InstanceType is ShardedCluster.
    nodeAvailabilityZones InstanceNodeAvailabilityZone[]
    The readonly node of the instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    nodeSpec string
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    period number
    The instance purchase duration, the value range is 1~3 when PeriodUtil is Year, the value range is 1~9 when PeriodUtil is Month. This parameter is required when the ChargeType is Prepaid.
    periodUnit string
    The period unit, valid value contains Year or Month. This parameter is required when the ChargeType is Prepaid.
    privateEndpoint string
    The private endpoint address of instance.
    projectName string
    The project name to which the instance belongs.
    readOnlyNodeNumber number
    The number of readonly node in instance.
    shardNumber number
    The number of shards in shard cluster, value range is 2~32, this parameter is required when the InstanceType is ShardedCluster.
    shards InstanceShard[]
    The shards information of the ShardedCluster instance.
    storageSpaceGb number
    The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster. Unit: GiB.
    subnetId string
    The subnet id of instance.
    superAccountPassword string
    The password of database account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    tags InstanceTag[]
    Tags.
    vpcId string
    The vpc ID.
    zoneId string
    This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones. The zone ID of instance.

    Deprecated: This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones.

    zoneIds string[]
    The list of zone ids. If you need to deploy multiple availability zones for a newly created instance, you can specify three availability zone IDs at the same time. By default, the first available zone passed in is the primary available zone, and the two available zones passed in afterwards are the backup available zones.
    auto_renew bool
    Whether to enable automatic renewal. This parameter is required when the ChargeType is Prepaid.
    charge_type str
    The charge type of instance, valid value contains Prepaid or PostPaid. Default is PostPaid.
    config_servers_id str
    The config servers id of the ShardedCluster instance.
    db_engine_version str
    The version of db engine, valid value contains MongoDB_4_0, MongoDB_4_2, MongoDB_4_4, MongoDB_5_0, MongoDB_6_0.
    instance_name str
    The instance name.
    instance_type str
    The type of instance, the valid value contains ReplicaSet or ShardedCluster. Default is ReplicaSet.
    mongos Sequence[InstanceMongoArgs]
    The mongos information of the ShardedCluster instance.
    mongos_id str
    The mongos id of the ShardedCluster instance.
    mongos_node_number int
    The mongos node number of shard cluster, value range is 2~23, this parameter is required when the InstanceType is ShardedCluster.
    mongos_node_spec str
    The mongos node spec of shard cluster, this parameter is required when the InstanceType is ShardedCluster.
    node_availability_zones Sequence[InstanceNodeAvailabilityZoneArgs]
    The readonly node of the instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    node_spec str
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    period int
    The instance purchase duration, the value range is 1~3 when PeriodUtil is Year, the value range is 1~9 when PeriodUtil is Month. This parameter is required when the ChargeType is Prepaid.
    period_unit str
    The period unit, valid value contains Year or Month. This parameter is required when the ChargeType is Prepaid.
    private_endpoint str
    The private endpoint address of instance.
    project_name str
    The project name to which the instance belongs.
    read_only_node_number int
    The number of readonly node in instance.
    shard_number int
    The number of shards in shard cluster, value range is 2~32, this parameter is required when the InstanceType is ShardedCluster.
    shards Sequence[InstanceShardArgs]
    The shards information of the ShardedCluster instance.
    storage_space_gb int
    The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster. Unit: GiB.
    subnet_id str
    The subnet id of instance.
    super_account_password str
    The password of database account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    tags Sequence[InstanceTagArgs]
    Tags.
    vpc_id str
    The vpc ID.
    zone_id str
    This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones. The zone ID of instance.

    Deprecated: This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones.

    zone_ids Sequence[str]
    The list of zone ids. If you need to deploy multiple availability zones for a newly created instance, you can specify three availability zone IDs at the same time. By default, the first available zone passed in is the primary available zone, and the two available zones passed in afterwards are the backup available zones.
    autoRenew Boolean
    Whether to enable automatic renewal. This parameter is required when the ChargeType is Prepaid.
    chargeType String
    The charge type of instance, valid value contains Prepaid or PostPaid. Default is PostPaid.
    configServersId String
    The config servers id of the ShardedCluster instance.
    dbEngineVersion String
    The version of db engine, valid value contains MongoDB_4_0, MongoDB_4_2, MongoDB_4_4, MongoDB_5_0, MongoDB_6_0.
    instanceName String
    The instance name.
    instanceType String
    The type of instance, the valid value contains ReplicaSet or ShardedCluster. Default is ReplicaSet.
    mongos List<Property Map>
    The mongos information of the ShardedCluster instance.
    mongosId String
    The mongos id of the ShardedCluster instance.
    mongosNodeNumber Number
    The mongos node number of shard cluster, value range is 2~23, this parameter is required when the InstanceType is ShardedCluster.
    mongosNodeSpec String
    The mongos node spec of shard cluster, this parameter is required when the InstanceType is ShardedCluster.
    nodeAvailabilityZones List<Property Map>
    The readonly node of the instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    nodeSpec String
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    period Number
    The instance purchase duration, the value range is 1~3 when PeriodUtil is Year, the value range is 1~9 when PeriodUtil is Month. This parameter is required when the ChargeType is Prepaid.
    periodUnit String
    The period unit, valid value contains Year or Month. This parameter is required when the ChargeType is Prepaid.
    privateEndpoint String
    The private endpoint address of instance.
    projectName String
    The project name to which the instance belongs.
    readOnlyNodeNumber Number
    The number of readonly node in instance.
    shardNumber Number
    The number of shards in shard cluster, value range is 2~32, this parameter is required when the InstanceType is ShardedCluster.
    shards List<Property Map>
    The shards information of the ShardedCluster instance.
    storageSpaceGb Number
    The total storage space of a replica set instance, or the storage space of a single shard in a sharded cluster. Unit: GiB.
    subnetId String
    The subnet id of instance.
    superAccountPassword String
    The password of database account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    tags List<Property Map>
    Tags.
    vpcId String
    The vpc ID.
    zoneId String
    This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones. The zone ID of instance.

    Deprecated: This field has been deprecated after version-0.0.156. Please use zone_ids to deploy multiple availability zones.

    zoneIds List<String>
    The list of zone ids. If you need to deploy multiple availability zones for a newly created instance, you can specify three availability zone IDs at the same time. By default, the first available zone passed in is the primary available zone, and the two available zones passed in afterwards are the backup available zones.

    Supporting Types

    InstanceMongo, InstanceMongoArgs

    MongosNodeId string
    The mongos node ID.
    NodeSpec string
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    NodeStatus string
    The node status.
    MongosNodeId string
    The mongos node ID.
    NodeSpec string
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    NodeStatus string
    The node status.
    mongosNodeId String
    The mongos node ID.
    nodeSpec String
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    nodeStatus String
    The node status.
    mongosNodeId string
    The mongos node ID.
    nodeSpec string
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    nodeStatus string
    The node status.
    mongos_node_id str
    The mongos node ID.
    node_spec str
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    node_status str
    The node status.
    mongosNodeId String
    The mongos node ID.
    nodeSpec String
    The spec of node. When the instance_type is ReplicaSet, this parameter represents the computing node specification of the replica set instance. When the instance_type is ShardedCluster, this parameter represents the specification of the Shard node.
    nodeStatus String
    The node status.

    InstanceNodeAvailabilityZone, InstanceNodeAvailabilityZoneArgs

    NodeNumber int
    The number of readonly nodes in current zone. Currently, only ReplicaSet instances and Shard in ShardedCluster instances support adding readonly nodes. When the instance_type is ReplicaSet, this value represents the total number of readonly nodes in a single replica set instance. Each instance of the replica set supports adding up to 5 readonly nodes. When the instance_type is ShardedCluster, this value represents the number of readonly nodes in each shard. Each shard can add up to 5 readonly nodes.
    ZoneId string
    The zone id of readonly nodes.
    NodeNumber int
    The number of readonly nodes in current zone. Currently, only ReplicaSet instances and Shard in ShardedCluster instances support adding readonly nodes. When the instance_type is ReplicaSet, this value represents the total number of readonly nodes in a single replica set instance. Each instance of the replica set supports adding up to 5 readonly nodes. When the instance_type is ShardedCluster, this value represents the number of readonly nodes in each shard. Each shard can add up to 5 readonly nodes.
    ZoneId string
    The zone id of readonly nodes.
    nodeNumber Integer
    The number of readonly nodes in current zone. Currently, only ReplicaSet instances and Shard in ShardedCluster instances support adding readonly nodes. When the instance_type is ReplicaSet, this value represents the total number of readonly nodes in a single replica set instance. Each instance of the replica set supports adding up to 5 readonly nodes. When the instance_type is ShardedCluster, this value represents the number of readonly nodes in each shard. Each shard can add up to 5 readonly nodes.
    zoneId String
    The zone id of readonly nodes.
    nodeNumber number
    The number of readonly nodes in current zone. Currently, only ReplicaSet instances and Shard in ShardedCluster instances support adding readonly nodes. When the instance_type is ReplicaSet, this value represents the total number of readonly nodes in a single replica set instance. Each instance of the replica set supports adding up to 5 readonly nodes. When the instance_type is ShardedCluster, this value represents the number of readonly nodes in each shard. Each shard can add up to 5 readonly nodes.
    zoneId string
    The zone id of readonly nodes.
    node_number int
    The number of readonly nodes in current zone. Currently, only ReplicaSet instances and Shard in ShardedCluster instances support adding readonly nodes. When the instance_type is ReplicaSet, this value represents the total number of readonly nodes in a single replica set instance. Each instance of the replica set supports adding up to 5 readonly nodes. When the instance_type is ShardedCluster, this value represents the number of readonly nodes in each shard. Each shard can add up to 5 readonly nodes.
    zone_id str
    The zone id of readonly nodes.
    nodeNumber Number
    The number of readonly nodes in current zone. Currently, only ReplicaSet instances and Shard in ShardedCluster instances support adding readonly nodes. When the instance_type is ReplicaSet, this value represents the total number of readonly nodes in a single replica set instance. Each instance of the replica set supports adding up to 5 readonly nodes. When the instance_type is ShardedCluster, this value represents the number of readonly nodes in each shard. Each shard can add up to 5 readonly nodes.
    zoneId String
    The zone id of readonly nodes.

    InstanceShard, InstanceShardArgs

    ShardId string
    The shard id.
    ShardId string
    The shard id.
    shardId String
    The shard id.
    shardId string
    The shard id.
    shard_id str
    The shard id.
    shardId String
    The shard id.

    InstanceTag, InstanceTagArgs

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    Import

    mongodb instance can be imported using the id, e.g.

    $ pulumi import volcengine:mongodb/instance:Instance default mongo-replica-e405f8e2****
    

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

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.29 published on Tuesday, Apr 29, 2025 by Volcengine