volcengine.mongodb.Instance
Explore with Pulumi AI
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:
- Node
Spec 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.
- Storage
Space intGb - 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 string - The subnet id of instance.
- Auto
Renew bool - Whether to enable automatic renewal. This parameter is required when the
ChargeType
isPrepaid
. - Charge
Type string - The charge type of instance, valid value contains
Prepaid
orPostPaid
. Default isPostPaid
. - Db
Engine stringVersion - 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 string - The instance name.
- Instance
Type string - The type of instance, the valid value contains
ReplicaSet
orShardedCluster
. Default isReplicaSet
. - Mongos
Node intNumber - The mongos node number of shard cluster, value range is
2~23
, this parameter is required when theInstanceType
isShardedCluster
. - Mongos
Node stringSpec - The mongos node spec of shard cluster, this parameter is required when the
InstanceType
isShardedCluster
. - Node
Availability List<InstanceZones Node Availability Zone> - 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
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
. This parameter is required when theChargeType
isPrepaid
. - Period
Unit string - The period unit, valid value contains
Year
orMonth
. This parameter is required when theChargeType
isPrepaid
. - Project
Name string - The project name to which the instance belongs.
- int
- The number of shards in shard cluster, value range is
2~32
, this parameter is required when theInstanceType
isShardedCluster
. - Super
Account stringPassword - 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.
- List<Instance
Tag> - Tags.
- Vpc
Id string - The vpc ID.
- Zone
Id 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. - Zone
Ids 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.
- Node
Spec 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.
- Storage
Space intGb - 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 string - The subnet id of instance.
- Auto
Renew bool - Whether to enable automatic renewal. This parameter is required when the
ChargeType
isPrepaid
. - Charge
Type string - The charge type of instance, valid value contains
Prepaid
orPostPaid
. Default isPostPaid
. - Db
Engine stringVersion - 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 string - The instance name.
- Instance
Type string - The type of instance, the valid value contains
ReplicaSet
orShardedCluster
. Default isReplicaSet
. - Mongos
Node intNumber - The mongos node number of shard cluster, value range is
2~23
, this parameter is required when theInstanceType
isShardedCluster
. - Mongos
Node stringSpec - The mongos node spec of shard cluster, this parameter is required when the
InstanceType
isShardedCluster
. - Node
Availability []InstanceZones Node Availability Zone Args - 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
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
. This parameter is required when theChargeType
isPrepaid
. - Period
Unit string - The period unit, valid value contains
Year
orMonth
. This parameter is required when theChargeType
isPrepaid
. - Project
Name string - The project name to which the instance belongs.
- int
- The number of shards in shard cluster, value range is
2~32
, this parameter is required when theInstanceType
isShardedCluster
. - Super
Account stringPassword - 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.
- []Instance
Tag Args - Tags.
- Vpc
Id string - The vpc ID.
- Zone
Id 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. - Zone
Ids []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 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.
- storage
Space IntegerGb - 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 String - The subnet id of instance.
- auto
Renew Boolean - Whether to enable automatic renewal. This parameter is required when the
ChargeType
isPrepaid
. - charge
Type String - The charge type of instance, valid value contains
Prepaid
orPostPaid
. Default isPostPaid
. - db
Engine StringVersion - 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 String - The instance name.
- instance
Type String - The type of instance, the valid value contains
ReplicaSet
orShardedCluster
. Default isReplicaSet
. - mongos
Node IntegerNumber - The mongos node number of shard cluster, value range is
2~23
, this parameter is required when theInstanceType
isShardedCluster
. - mongos
Node StringSpec - The mongos node spec of shard cluster, this parameter is required when the
InstanceType
isShardedCluster
. - node
Availability List<InstanceZones Node Availability Zone> - 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
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
. This parameter is required when theChargeType
isPrepaid
. - period
Unit String - The period unit, valid value contains
Year
orMonth
. This parameter is required when theChargeType
isPrepaid
. - project
Name String - The project name to which the instance belongs.
- Integer
- The number of shards in shard cluster, value range is
2~32
, this parameter is required when theInstanceType
isShardedCluster
. - super
Account StringPassword - 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.
- List<Instance
Tag> - Tags.
- vpc
Id String - The vpc ID.
- zone
Id 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. - zone
Ids 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.
- node
Spec 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.
- storage
Space numberGb - 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 string - The subnet id of instance.
- auto
Renew boolean - Whether to enable automatic renewal. This parameter is required when the
ChargeType
isPrepaid
. - charge
Type string - The charge type of instance, valid value contains
Prepaid
orPostPaid
. Default isPostPaid
. - db
Engine stringVersion - 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 string - The instance name.
- instance
Type string - The type of instance, the valid value contains
ReplicaSet
orShardedCluster
. Default isReplicaSet
. - mongos
Node numberNumber - The mongos node number of shard cluster, value range is
2~23
, this parameter is required when theInstanceType
isShardedCluster
. - mongos
Node stringSpec - The mongos node spec of shard cluster, this parameter is required when the
InstanceType
isShardedCluster
. - node
Availability InstanceZones Node Availability Zone[] - 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
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
. This parameter is required when theChargeType
isPrepaid
. - period
Unit string - The period unit, valid value contains
Year
orMonth
. This parameter is required when theChargeType
isPrepaid
. - project
Name string - The project name to which the instance belongs.
- number
- The number of shards in shard cluster, value range is
2~32
, this parameter is required when theInstanceType
isShardedCluster
. - super
Account stringPassword - 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.
- Instance
Tag[] - Tags.
- vpc
Id string - The vpc ID.
- zone
Id 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. - zone
Ids 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_ intgb - 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
isPrepaid
. - charge_
type str - The charge type of instance, valid value contains
Prepaid
orPostPaid
. Default isPostPaid
. - db_
engine_ strversion - 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
orShardedCluster
. Default isReplicaSet
. - mongos_
node_ intnumber - The mongos node number of shard cluster, value range is
2~23
, this parameter is required when theInstanceType
isShardedCluster
. - mongos_
node_ strspec - The mongos node spec of shard cluster, this parameter is required when the
InstanceType
isShardedCluster
. - node_
availability_ Sequence[Instancezones Node Availability Zone Args] - 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
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
. This parameter is required when theChargeType
isPrepaid
. - period_
unit str - The period unit, valid value contains
Year
orMonth
. This parameter is required when theChargeType
isPrepaid
. - project_
name str - The project name to which the instance belongs.
- int
- The number of shards in shard cluster, value range is
2~32
, this parameter is required when theInstanceType
isShardedCluster
. - super_
account_ strpassword - 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.
- Sequence[Instance
Tag Args] - 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. - 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.
- node
Spec 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.
- storage
Space NumberGb - 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 String - The subnet id of instance.
- auto
Renew Boolean - Whether to enable automatic renewal. This parameter is required when the
ChargeType
isPrepaid
. - charge
Type String - The charge type of instance, valid value contains
Prepaid
orPostPaid
. Default isPostPaid
. - db
Engine StringVersion - 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 String - The instance name.
- instance
Type String - The type of instance, the valid value contains
ReplicaSet
orShardedCluster
. Default isReplicaSet
. - mongos
Node NumberNumber - The mongos node number of shard cluster, value range is
2~23
, this parameter is required when theInstanceType
isShardedCluster
. - mongos
Node StringSpec - The mongos node spec of shard cluster, this parameter is required when the
InstanceType
isShardedCluster
. - node
Availability List<Property Map>Zones - 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
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
. This parameter is required when theChargeType
isPrepaid
. - period
Unit String - The period unit, valid value contains
Year
orMonth
. This parameter is required when theChargeType
isPrepaid
. - project
Name String - The project name to which the instance belongs.
- Number
- The number of shards in shard cluster, value range is
2~32
, this parameter is required when theInstanceType
isShardedCluster
. - super
Account StringPassword - 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.
- List<Property Map>
- Tags.
- vpc
Id String - The vpc ID.
- zone
Id 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. - zone
Ids 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:
- Config
Servers stringId - The config servers id of the ShardedCluster instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mongos
List<Instance
Mongo> - The mongos information of the ShardedCluster instance.
- Mongos
Id string - The mongos id of the ShardedCluster instance.
- Private
Endpoint string - The private endpoint address of instance.
- Read
Only intNode Number - The number of readonly node in instance.
- List<Instance
Shard> - The shards information of the ShardedCluster instance.
- Config
Servers stringId - The config servers id of the ShardedCluster instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mongos
[]Instance
Mongo - The mongos information of the ShardedCluster instance.
- Mongos
Id string - The mongos id of the ShardedCluster instance.
- Private
Endpoint string - The private endpoint address of instance.
- Read
Only intNode Number - The number of readonly node in instance.
- []Instance
Shard - The shards information of the ShardedCluster instance.
- config
Servers StringId - The config servers id of the ShardedCluster instance.
- id String
- The provider-assigned unique ID for this managed resource.
- mongos
List<Instance
Mongo> - The mongos information of the ShardedCluster instance.
- mongos
Id String - The mongos id of the ShardedCluster instance.
- private
Endpoint String - The private endpoint address of instance.
- read
Only IntegerNode Number - The number of readonly node in instance.
- List<Instance
Shard> - The shards information of the ShardedCluster instance.
- config
Servers stringId - The config servers id of the ShardedCluster instance.
- id string
- The provider-assigned unique ID for this managed resource.
- mongos
Instance
Mongo[] - The mongos information of the ShardedCluster instance.
- mongos
Id string - The mongos id of the ShardedCluster instance.
- private
Endpoint string - The private endpoint address of instance.
- read
Only numberNode Number - The number of readonly node in instance.
- Instance
Shard[] - The shards information of the ShardedCluster instance.
- config_
servers_ strid - The config servers id of the ShardedCluster instance.
- id str
- The provider-assigned unique ID for this managed resource.
- mongos
Sequence[Instance
Mongo] - 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_ intnode_ number - The number of readonly node in instance.
- Sequence[Instance
Shard] - The shards information of the ShardedCluster instance.
- config
Servers StringId - 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.
- mongos
Id String - The mongos id of the ShardedCluster instance.
- private
Endpoint String - The private endpoint address of instance.
- read
Only NumberNode Number - The number of readonly node in instance.
- 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.
- Auto
Renew bool - Whether to enable automatic renewal. This parameter is required when the
ChargeType
isPrepaid
. - Charge
Type string - The charge type of instance, valid value contains
Prepaid
orPostPaid
. Default isPostPaid
. - Config
Servers stringId - The config servers id of the ShardedCluster instance.
- Db
Engine stringVersion - 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 string - The instance name.
- Instance
Type string - The type of instance, the valid value contains
ReplicaSet
orShardedCluster
. Default isReplicaSet
. - Mongos
List<Instance
Mongo> - The mongos information of the ShardedCluster instance.
- Mongos
Id string - The mongos id of the ShardedCluster instance.
- Mongos
Node intNumber - The mongos node number of shard cluster, value range is
2~23
, this parameter is required when theInstanceType
isShardedCluster
. - Mongos
Node stringSpec - The mongos node spec of shard cluster, this parameter is required when the
InstanceType
isShardedCluster
. - Node
Availability List<InstanceZones Node Availability Zone> - 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 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
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
. This parameter is required when theChargeType
isPrepaid
. - Period
Unit string - The period unit, valid value contains
Year
orMonth
. This parameter is required when theChargeType
isPrepaid
. - Private
Endpoint string - The private endpoint address of instance.
- Project
Name string - The project name to which the instance belongs.
- Read
Only intNode Number - 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 theInstanceType
isShardedCluster
. - Shards
List<Instance
Shard> - The shards information of the ShardedCluster instance.
- Storage
Space intGb - 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 string - The subnet id of instance.
- Super
Account stringPassword - 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.
- List<Instance
Tag> - Tags.
- Vpc
Id string - The vpc ID.
- Zone
Id 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. - Zone
Ids 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.
- Auto
Renew bool - Whether to enable automatic renewal. This parameter is required when the
ChargeType
isPrepaid
. - Charge
Type string - The charge type of instance, valid value contains
Prepaid
orPostPaid
. Default isPostPaid
. - Config
Servers stringId - The config servers id of the ShardedCluster instance.
- Db
Engine stringVersion - 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 string - The instance name.
- Instance
Type string - The type of instance, the valid value contains
ReplicaSet
orShardedCluster
. Default isReplicaSet
. - Mongos
[]Instance
Mongo Args - The mongos information of the ShardedCluster instance.
- Mongos
Id string - The mongos id of the ShardedCluster instance.
- Mongos
Node intNumber - The mongos node number of shard cluster, value range is
2~23
, this parameter is required when theInstanceType
isShardedCluster
. - Mongos
Node stringSpec - The mongos node spec of shard cluster, this parameter is required when the
InstanceType
isShardedCluster
. - Node
Availability []InstanceZones Node Availability Zone Args - 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 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
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
. This parameter is required when theChargeType
isPrepaid
. - Period
Unit string - The period unit, valid value contains
Year
orMonth
. This parameter is required when theChargeType
isPrepaid
. - Private
Endpoint string - The private endpoint address of instance.
- Project
Name string - The project name to which the instance belongs.
- Read
Only intNode Number - 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 theInstanceType
isShardedCluster
. - Shards
[]Instance
Shard Args - The shards information of the ShardedCluster instance.
- Storage
Space intGb - 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 string - The subnet id of instance.
- Super
Account stringPassword - 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.
- []Instance
Tag Args - Tags.
- Vpc
Id string - The vpc ID.
- Zone
Id 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. - Zone
Ids []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 Boolean - Whether to enable automatic renewal. This parameter is required when the
ChargeType
isPrepaid
. - charge
Type String - The charge type of instance, valid value contains
Prepaid
orPostPaid
. Default isPostPaid
. - config
Servers StringId - The config servers id of the ShardedCluster instance.
- db
Engine StringVersion - 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 String - The instance name.
- instance
Type String - The type of instance, the valid value contains
ReplicaSet
orShardedCluster
. Default isReplicaSet
. - mongos
List<Instance
Mongo> - The mongos information of the ShardedCluster instance.
- mongos
Id String - The mongos id of the ShardedCluster instance.
- mongos
Node IntegerNumber - The mongos node number of shard cluster, value range is
2~23
, this parameter is required when theInstanceType
isShardedCluster
. - mongos
Node StringSpec - The mongos node spec of shard cluster, this parameter is required when the
InstanceType
isShardedCluster
. - node
Availability List<InstanceZones Node Availability Zone> - 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 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
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
. This parameter is required when theChargeType
isPrepaid
. - period
Unit String - The period unit, valid value contains
Year
orMonth
. This parameter is required when theChargeType
isPrepaid
. - private
Endpoint String - The private endpoint address of instance.
- project
Name String - The project name to which the instance belongs.
- read
Only IntegerNode Number - The number of readonly node in instance.
- shard
Number Integer - The number of shards in shard cluster, value range is
2~32
, this parameter is required when theInstanceType
isShardedCluster
. - shards
List<Instance
Shard> - The shards information of the ShardedCluster instance.
- storage
Space IntegerGb - 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 String - The subnet id of instance.
- super
Account StringPassword - 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.
- List<Instance
Tag> - Tags.
- vpc
Id String - The vpc ID.
- zone
Id 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. - zone
Ids 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.
- auto
Renew boolean - Whether to enable automatic renewal. This parameter is required when the
ChargeType
isPrepaid
. - charge
Type string - The charge type of instance, valid value contains
Prepaid
orPostPaid
. Default isPostPaid
. - config
Servers stringId - The config servers id of the ShardedCluster instance.
- db
Engine stringVersion - 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 string - The instance name.
- instance
Type string - The type of instance, the valid value contains
ReplicaSet
orShardedCluster
. Default isReplicaSet
. - mongos
Instance
Mongo[] - The mongos information of the ShardedCluster instance.
- mongos
Id string - The mongos id of the ShardedCluster instance.
- mongos
Node numberNumber - The mongos node number of shard cluster, value range is
2~23
, this parameter is required when theInstanceType
isShardedCluster
. - mongos
Node stringSpec - The mongos node spec of shard cluster, this parameter is required when the
InstanceType
isShardedCluster
. - node
Availability InstanceZones Node Availability Zone[] - 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 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
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
. This parameter is required when theChargeType
isPrepaid
. - period
Unit string - The period unit, valid value contains
Year
orMonth
. This parameter is required when theChargeType
isPrepaid
. - private
Endpoint string - The private endpoint address of instance.
- project
Name string - The project name to which the instance belongs.
- read
Only numberNode Number - The number of readonly node in instance.
- shard
Number number - The number of shards in shard cluster, value range is
2~32
, this parameter is required when theInstanceType
isShardedCluster
. - shards
Instance
Shard[] - The shards information of the ShardedCluster instance.
- storage
Space numberGb - 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 string - The subnet id of instance.
- super
Account stringPassword - 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.
- Instance
Tag[] - Tags.
- vpc
Id string - The vpc ID.
- zone
Id 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. - zone
Ids 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
isPrepaid
. - charge_
type str - The charge type of instance, valid value contains
Prepaid
orPostPaid
. Default isPostPaid
. - config_
servers_ strid - The config servers id of the ShardedCluster instance.
- db_
engine_ strversion - 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
orShardedCluster
. Default isReplicaSet
. - mongos
Sequence[Instance
Mongo Args] - The mongos information of the ShardedCluster instance.
- mongos_
id str - The mongos id of the ShardedCluster instance.
- mongos_
node_ intnumber - The mongos node number of shard cluster, value range is
2~23
, this parameter is required when theInstanceType
isShardedCluster
. - mongos_
node_ strspec - The mongos node spec of shard cluster, this parameter is required when the
InstanceType
isShardedCluster
. - node_
availability_ Sequence[Instancezones Node Availability Zone Args] - 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
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
. This parameter is required when theChargeType
isPrepaid
. - period_
unit str - The period unit, valid value contains
Year
orMonth
. This parameter is required when theChargeType
isPrepaid
. - private_
endpoint str - The private endpoint address of instance.
- project_
name str - The project name to which the instance belongs.
- read_
only_ intnode_ number - 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 theInstanceType
isShardedCluster
. - shards
Sequence[Instance
Shard Args] - The shards information of the ShardedCluster instance.
- storage_
space_ intgb - 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_ strpassword - 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.
- Sequence[Instance
Tag Args] - 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. - 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.
- auto
Renew Boolean - Whether to enable automatic renewal. This parameter is required when the
ChargeType
isPrepaid
. - charge
Type String - The charge type of instance, valid value contains
Prepaid
orPostPaid
. Default isPostPaid
. - config
Servers StringId - The config servers id of the ShardedCluster instance.
- db
Engine StringVersion - 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 String - The instance name.
- instance
Type String - The type of instance, the valid value contains
ReplicaSet
orShardedCluster
. Default isReplicaSet
. - mongos List<Property Map>
- The mongos information of the ShardedCluster instance.
- mongos
Id String - The mongos id of the ShardedCluster instance.
- mongos
Node NumberNumber - The mongos node number of shard cluster, value range is
2~23
, this parameter is required when theInstanceType
isShardedCluster
. - mongos
Node StringSpec - The mongos node spec of shard cluster, this parameter is required when the
InstanceType
isShardedCluster
. - node
Availability List<Property Map>Zones - 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 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
whenPeriodUtil
isYear
, the value range is1~9
whenPeriodUtil
isMonth
. This parameter is required when theChargeType
isPrepaid
. - period
Unit String - The period unit, valid value contains
Year
orMonth
. This parameter is required when theChargeType
isPrepaid
. - private
Endpoint String - The private endpoint address of instance.
- project
Name String - The project name to which the instance belongs.
- read
Only NumberNode Number - The number of readonly node in instance.
- shard
Number Number - The number of shards in shard cluster, value range is
2~32
, this parameter is required when theInstanceType
isShardedCluster
. - shards List<Property Map>
- The shards information of the ShardedCluster instance.
- storage
Space NumberGb - 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 String - The subnet id of instance.
- super
Account StringPassword - 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.
- List<Property Map>
- Tags.
- vpc
Id String - The vpc ID.
- zone
Id 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. - zone
Ids 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
- Mongos
Node stringId - The mongos node ID.
- Node
Spec 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.
- Node
Status string - The node status.
- Mongos
Node stringId - The mongos node ID.
- Node
Spec 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.
- Node
Status string - The node status.
- mongos
Node StringId - The mongos node ID.
- node
Spec 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.
- node
Status String - The node status.
- mongos
Node stringId - The mongos node ID.
- node
Spec 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.
- node
Status string - The node status.
- mongos_
node_ strid - 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.
- mongos
Node StringId - The mongos node ID.
- node
Spec 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.
- node
Status String - The node status.
InstanceNodeAvailabilityZone, InstanceNodeAvailabilityZoneArgs
- 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 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 string - The zone id of readonly nodes.
- node
Number 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.
- zone
Id String - The zone id of readonly nodes.
- node
Number 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.
- zone
Id 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.
- node
Number 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.
- zone
Id String - The zone id of readonly nodes.
InstanceShard, InstanceShardArgs
- string
- The shard id.
- string
- The shard id.
- String
- The shard id.
- string
- The shard id.
- str
- The shard id.
- String
- The shard id.
InstanceTag, InstanceTagArgs
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.