alicloud_message_service_topic

更新时间:

Provides a Message Service Topic resource.

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

-> NOTE: Available since v1.188.0.

Example Usage

Basic Usage


variable "name" {
  default = "terraform-example"
}

resource "alicloud_message_service_topic" "default" {
  topic_name       = var.name
  max_message_size = 16888
  enable_logging   = true
}

Argument Reference

The following arguments are supported:

  • enable_logging - (Optional, Bool, Available since v1.241.0) Specifies whether to enable the logging feature. Default value: false. Valid values:
    • true: Enable.
    • false: Disable.
  • max_message_size - (Optional, Int) The maximum length of the message that is sent to the topic. Default value: 65536. Valid values: 1024 to 65536. Unit: bytes.
  • tags - (Optional, Map, Available since v1.241.0) A mapping of tags to assign to the resource.
  • topic_name - (Required, ForceNew) The name of the topic.

The following arguments will be discarded. Please use new fields as soon as possible:

  • logging_enabled - (Deprecated since v1.241.0). Field logging_enabled has been deprecated from provider version 1.241.0. New field enable_logging instead.

Attributes Reference

The following attributes are exported:

  • id - The resource ID in terraform of Topic.
  • create_time - (Available since v1.241.0) The time when the topic was created.

Timeouts

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

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

Import

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

$ terraform import alicloud_message_service_topic.example <id>