alicloud_event_bridge_event_source
更新时间:
复制 MD 格式
Provides a Event Bridge Event Source resource.
For information about Event Bridge Event Source and how to use it, see What is Event Source.
-> NOTE: Available since v1.130.0.
-> NOTE: Deprecated since v1.269.0.
-> DEPRECATED: This resource has been deprecated from version 1.269.0. Please use new resource alicloud_event_bridge_event_source_v2.
Example Usage
Basic Usage
variable "name" {
default = "terraform-example"
}
resource "random_integer" "default" {
min = 10000
max = 99999
}
resource "alicloud_mns_queue" "default" {
name = "${var.name}-${random_integer.default.result}"
}
resource "alicloud_event_bridge_event_bus" "default" {
event_bus_name = "${var.name}-${random_integer.default.result}"
}
resource "alicloud_event_bridge_event_source" "default" {
event_bus_name = alicloud_event_bridge_event_bus.default.event_bus_name
event_source_name = "${var.name}-${random_integer.default.result}"
description = var.name
linked_external_source = true
external_source_type = "MNS"
external_source_config = {
QueueName = alicloud_mns_queue.default.name
}
}
Need more examples? VIEW MORE EXAMPLES
Argument Reference
The following arguments are supported:
event_bus_name- (Required, ForceNew) The name of the event bus to which the event source is attached.event_source_name- (Required, ForceNew) The name of the event source.external_source_type- (Optional) The type of the external data source. Valid values:RabbitMQ,RocketMQandMNS.external_source_config- (Optional, Map) The configuration of the external data source. Whenexternal_source_typeisRabbitMQ, The following attributes are supported:RegionId- The region ID of RabbitMQ.InstanceId- The instance ID of RabbitMQ.VirtualHostName- The virtual host name of RabbitMQ.QueueName- The queue name of RabbitMQ. Whenexternal_source_typeisRabbitMQ, The following attributes are supported:RegionId- The region ID of RabbitMQ.InstanceId- The instance ID of RabbitMQ.Topic- The topic of RabbitMQ.Offset- The offset of RabbitMQ, valid values:CONSUME_FROM_FIRST_OFFSET,CONSUME_FROM_LAST_OFFSETandCONSUME_FROM_TIMESTAMP.GroupID- The group ID of consumer. Whenexternal_source_typeisMNS, The following attributes are supported:QueueName- The queue name of MNS.description- (Optional) The description of the event source.linked_external_source- (Optional) Specifies whether to connect to an external data source. Default value:false.
Attributes Reference
The following attributes are exported:
id- The resource ID in terraform of Event Source. Value asevent_source_name.
Import
Event Bridge Event Source can be imported using the id, e.g.
$ terraform import alicloud_event_bridge_event_source.example <event_source_name>
该文章对您有帮助吗?