Skip to content

Commit f92a78c

Browse files
authored
fix: Enable adding event_source_name to an Event Bus to enable receiving events from an SaaS partner (terraform-aws-modules#82)
1 parent d1aa8f6 commit f92a78c

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ No modules.
458458
| <a name="input_create_schemas_discoverer"></a> [create\_schemas\_discoverer](#input\_create\_schemas\_discoverer) | Controls whether default schemas discoverer should be created | `bool` | `false` | no |
459459
| <a name="input_create_targets"></a> [create\_targets](#input\_create\_targets) | Controls whether EventBridge Target resources should be created | `bool` | `true` | no |
460460
| <a name="input_ecs_target_arns"></a> [ecs\_target\_arns](#input\_ecs\_target\_arns) | The Amazon Resource Name (ARN) of the AWS ECS Tasks you want to use as EventBridge targets | `list(string)` | `[]` | no |
461+
| <a name="input_event_source_name"></a> [event\_source\_name](#input\_event\_source\_name) | The partner event source that the new event bus will be matched with. Must match name. | `string` | `null` | no |
461462
| <a name="input_kinesis_firehose_target_arns"></a> [kinesis\_firehose\_target\_arns](#input\_kinesis\_firehose\_target\_arns) | The Amazon Resource Name (ARN) of the Kinesis Firehose Delivery Streams you want to use as EventBridge targets | `list(string)` | `[]` | no |
462463
| <a name="input_kinesis_target_arns"></a> [kinesis\_target\_arns](#input\_kinesis\_target\_arns) | The Amazon Resource Name (ARN) of the Kinesis Streams you want to use as EventBridge targets | `list(string)` | `[]` | no |
463464
| <a name="input_lambda_target_arns"></a> [lambda\_target\_arns](#input\_lambda\_target\_arns) | The Amazon Resource Name (ARN) of the Lambda Functions you want to use as EventBridge targets | `list(string)` | `[]` | no |

main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ data "aws_cloudwatch_event_bus" "this" {
4040
resource "aws_cloudwatch_event_bus" "this" {
4141
count = var.create && var.create_bus ? 1 : 0
4242

43-
name = var.bus_name
43+
name = var.bus_name
44+
event_source_name = try(var.event_source_name, null)
45+
4446
tags = var.tags
4547
}
4648

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ variable "bus_name" {
8484
default = "default"
8585
}
8686

87+
variable "event_source_name" {
88+
description = "The partner event source that the new event bus will be matched with. Must match name."
89+
type = string
90+
default = null
91+
}
92+
8793
variable "schemas_discoverer_description" {
8894
description = "Default schemas discoverer description"
8995
type = string

0 commit comments

Comments
 (0)