文档

alicloud_message_service_topic

更新时间:

Provides a Message Notification Service Topic resource.

For information about Message Notification Service Topic and how to use it, see What is Topic.

-> NOTE: Available since v1.188.0.

Example Usage

Basic Usage

variable "name" {
  default = "tf-example"
}
resource "alicloud_message_service_topic" "default" {
  topic_name       = var.name
  max_message_size = 12357
  logging_enabled  = true
}

Argument Reference

The following arguments are supported:

  • topic_name - (Required, ForceNew) Two topics on a single account in the same region cannot have the same name. A topic name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 255 characters.
  • max_message_size - (Optional) The maximum size of a message body that can be sent to the topic. Unit: bytes. Valid values: 1024-65536. Default value: 65536.
  • logging_enabled - (Optional) Specifies whether to enable the log management feature. Default value: false. Valid values:
    • true: enables the log management feature.
    • false: disables the log management feature.

Attributes Reference

The following attributes are exported:

  • id - The resource ID in terraform of Topic. Its value is same as topic_name.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 3 mins) Used when create the Topic.
  • update - (Defaults to 3 mins) Used when update the Topic.
  • delete - (Defaults to 3 mins) Used when delete the Topic.

Import

Message Notification Service Topic can be imported using the id or topic_name, e.g.

$ terraform import alicloud_message_service_topic.example <topic_name>

  • 本页导读 (0)
文档反馈