alicloud_event_bridge_event_source
更新时间:
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.
Example Usage
Basic Usage
variable "name" {
default = "tf-example"
}
resource "random_integer" "default" {
min = 10000
max = 99999
}
resource "alicloud_event_bridge_event_bus" "example" {
event_bus_name = var.name
}
resource "alicloud_mns_queue" "example" {
name = "${var.name}-${random_integer.default.result}"
}
resource "alicloud_event_bridge_event_source" "example" {
event_bus_name = alicloud_event_bridge_event_bus.example.event_bus_name
event_source_name = var.name
description = var.name
linked_external_source = true
external_source_type = "MNS"
external_source_config = {
QueueName = alicloud_mns_queue.example.name
}
}
Argument Reference
The following arguments are supported:
event_bus_name
- (Required, ForceNew) The name of event bus.description
- (Optional) The detail describe of event source.event_source_name
- (Required, ForceNew) The code name of event source.linked_external_source
- (Optional, Computed) Whether to connect to an external data source. Default value:false
external_source_type
- (Optional) The type of external data source. Valid value :RabbitMQ
,RocketMQ
andMNS
. NOTE: Only Whenlinked_external_source
istrue
, This field is valid.external_source_config
- (Optional, Map) The config of external source. Whenexternal_source_type
isRabbitMQ
, 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_type
isRabbitMQ
, 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_OFFSET
andCONSUME_FROM_TIMESTAMP
.GroupID
- The group ID of consumer. Whenexternal_source_type
isMNS
, The following attributes are supported:QueueName
- The queue name of MNS.
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>
文档内容是否对您有帮助?