Skip to content

Commit e30c402

Browse files
yuntacQuentin RAGOUCY-AUBEZONbryantbiggs
authored
fix: Use externally created eventbus for event archive when create_bus is set to false (#176)
Co-authored-by: Quentin RAGOUCY-AUBEZON <[email protected]> Co-authored-by: Bryant Biggs <[email protected]>
1 parent 6f0a6c7 commit e30c402

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
@@ -347,7 +347,7 @@ resource "aws_cloudwatch_event_archive" "this" {
347347
region = var.region
348348

349349
name = lookup(each.value, "name", each.key)
350-
event_source_arn = try(each.value["event_source_arn"], aws_cloudwatch_event_bus.this[0].arn)
350+
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)
351351

352352
description = lookup(each.value, "description", null)
353353
event_pattern = lookup(each.value, "event_pattern", null)

0 commit comments

Comments
 (0)