Skip to content

Commit 9309392

Browse files
author
Quentin RAGOUCY-AUBEZON
committed
feat: allow to use eventbus data for event archive when create_bus is set to false
1 parent 3e8657c commit 9309392

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ resource "aws_cloudwatch_event_archive" "this" {
285285
region = var.region
286286

287287
name = lookup(each.value, "name", each.key)
288-
event_source_arn = try(each.value["event_source_arn"], aws_cloudwatch_event_bus.this[0].arn)
288+
event_source_arn = try(each.value["event_source_arn"], var.create_bus ? aws_cloudwatch_event_bus.this[0].arn : data.aws_cloudwatch_event_bus.this[0].arn)
289289

290290
description = lookup(each.value, "description", null)
291291
event_pattern = lookup(each.value, "event_pattern", null)

0 commit comments

Comments
 (0)