alicloud_mongodb_instances
更新时间:
The alicloud_mongodb_instances
data source provides a collection of MongoDB instances available in Alicloud account.
Filters support regular expression for the instance name, engine or instance type.
Example Usage
data "alicloud_mongodb_instances" "mongo" {
name_regex = "dds-.+\\d+"
instance_type = "replicate"
instance_class = "dds.mongo.mid"
availability_zone = "eu-central-1a"
}
Argument Reference
The following arguments are supported:
name_regex
- (Optional) A regex string to apply to the instance name.ids
- (Optional, Available 1.53.0+) The ids list of MongoDB instancesinstance_type
- (Optional) Type of the instance to be queried. If it is set tosharding
, the sharded cluster instances are listed. If it is set toreplicate
, replica set instances are listed. Default valuereplicate
.instance_class
- (Optional) Sizing of the instance to be queried.availability_zone
- (Optional) Instance availability zone.tags
- (Optional, Available in v1.66.0+) A mapping of tags to assign to the resource.output_file
- (Optional) The name of file that can save the collection of instances after runningterraform plan
.
Attributes Reference
The following attributes are exported in addition to the arguments listed above:
ids
- The ids list of MongoDB instancesnames
- The names list of MongoDB instancesinstances
- A list of MongoDB instances. Its every element contains the following attributes:id
- The ID of the MongoDB instance.name
- The name of the MongoDB instance.charge_type
- Billing method. Value options arePostPaid
for Pay-As-You-Go andPrePaid
for yearly or monthly subscription.instance_type
- Instance type. Optional valuessharding
orreplicate
.region_id
- Region ID the instance belongs to.creation_time
- Creation time of the instance in RFC3339 format.expiration_time
- Expiration time in RFC3339 format. Pay-As-You-Go instances are never expire.status
- Status of the instance.replication
- Replication factor corresponds to number of nodes. Optional values are1
for single node and3
for three nodes replica set.engine
- Database engine type. Supported option isMongoDB
.engine_version
- Database engine version.network_type
- Classic network or VPC.instance_class
- Sizing of the MongoDB instance.lock_mode
- Lock status of the instance.storage
- Storage size.mongos
- Array composed of Mongos.node_id
- Mongos instance ID.description
- Mongos instance description.class
- Mongos instance specification.
shards
- Array composed of shards.node_id
- Shard instance ID.description
- Shard instance description.class
- Shard instance specification.storage
- Shard disk.
availability_zone
- Instance availability zone.
文档内容是否对您有帮助?