Provides an ONS instance resource.
For more information about how to use it, see RocketMQ Instance Management API.
Basic Usage
variable "name" {
default = "tf-example"
}
resource "random_integer" "default" {
min = 10000
max = 99999
}
resource "alicloud_ons_instance" "example" {
instance_name = "${var.name}-${random_integer.default.result}"
remark = var.name
}
The following arguments are supported:
name
- (Optional, Deprecated from v1.97.0+) Replaced by instance_name
after version 1.97.0.instance_name
- (Optional, Available in v1.97.0+) Two instances on a single account in the same region cannot have the same name. The length must be 3 to 64 characters. Chinese characters, English letters digits and hyphen are allowed.remark
- (Optional) This attribute is a concise description of instance. The length cannot exceed 128.tags
- (Optional, Available in v1.97.0+) A mapping of tags to assign to the resource.
The following attributes are exported:
id
- The key
of the resource supplied above.instance_type
- The edition of instance. 1 represents the postPaid edition, and 2 represents the platinum edition.instance_status
- The status of instance. 1 represents the platinum edition instance is in deployment. 2 represents the postpaid edition instance are overdue. 5 represents the postpaid or platinum edition instance is in service. 7 represents the platinum version instance is in upgrade and the service is available.release_time
- Platinum edition instance expiration time.status
- The status of instance. 1 represents the platinum edition instance is in deployment. 2 represents the postpaid edition instance are overdue. 5 represents the postpaid or platinum edition instance is in service. 7 represents the platinum version instance is in upgrade and the service is available.ONS INSTANCE can be imported using the id, e.g.
$ terraform import alicloud_ons_instance.instance MQ_INST_1234567890_Baso1234567