Resource: aws_cloudwatch_event_bus

Provides an EventBridge event bus resource.

Example Usage

resource "aws_cloudwatch_event_bus" "messenger" {
  name = "chat-messages"
}
data "aws_cloudwatch_event_source" "examplepartner" {
  name_prefix = "aws.partner/examplepartner.com"
}

resource "aws_cloudwatch_event_bus" "examplepartner" {
  name              = data.aws_cloudwatch_event_source.examplepartner.name
  event_source_name = data.aws_cloudwatch_event_source.examplepartner.name
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import EventBridge event buses using the name (which can also be a partner event source name). For example:

import {
  to = aws_cloudwatch_event_bus.messenger
  id = "chat-messages"
}

Using terraform import, import EventBridge event buses using the name (which can also be a partner event source name). For example:

% terraform import aws_cloudwatch_event_bus.messenger chat-messages