From 86811d0c1c5dc6fab872215dbfcd95f573bc551f Mon Sep 17 00:00:00 2001 From: build-tools-test Date: Mon, 3 Apr 2023 14:50:20 -0500 Subject: [PATCH 1/4] fix: Add event bus name to cloudwatch event targets --- cloudwatch_event_rules.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudwatch_event_rules.tf b/cloudwatch_event_rules.tf index f75cb01..fca959b 100644 --- a/cloudwatch_event_rules.tf +++ b/cloudwatch_event_rules.tf @@ -24,7 +24,7 @@ resource "aws_cloudwatch_event_rule" "lambda" { resource "aws_cloudwatch_event_target" "lambda" { for_each = var.cloudwatch_event_rules - + event_bus_name = lookup(each.value, "event_bus_name", null) arn = lookup(each.value, "cloudwatch_event_target_arn", local.function_arn) rule = aws_cloudwatch_event_rule.lambda[each.key].name input = lookup(each.value, "cloudwatch_event_target_input", null) From ec7e7781fe20babf67f81fa07074448f1a415529 Mon Sep 17 00:00:00 2001 From: build-tools-test Date: Mon, 3 Apr 2023 14:51:22 -0500 Subject: [PATCH 2/4] lint --- cloudwatch_event_rules.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cloudwatch_event_rules.tf b/cloudwatch_event_rules.tf index fca959b..cfe4a9b 100644 --- a/cloudwatch_event_rules.tf +++ b/cloudwatch_event_rules.tf @@ -23,9 +23,9 @@ resource "aws_cloudwatch_event_rule" "lambda" { } resource "aws_cloudwatch_event_target" "lambda" { - for_each = var.cloudwatch_event_rules + for_each = var.cloudwatch_event_rules event_bus_name = lookup(each.value, "event_bus_name", null) - arn = lookup(each.value, "cloudwatch_event_target_arn", local.function_arn) - rule = aws_cloudwatch_event_rule.lambda[each.key].name - input = lookup(each.value, "cloudwatch_event_target_input", null) + arn = lookup(each.value, "cloudwatch_event_target_arn", local.function_arn) + rule = aws_cloudwatch_event_rule.lambda[each.key].name + input = lookup(each.value, "cloudwatch_event_target_input", null) } From 0eb6f7ad01ce76342e1fc36ec14a3c824eaa59a0 Mon Sep 17 00:00:00 2001 From: build-tools-test Date: Wed, 5 Apr 2023 08:00:19 -0500 Subject: [PATCH 3/4] pr feedback --- cloudwatch_event_rules.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/cloudwatch_event_rules.tf b/cloudwatch_event_rules.tf index cfe4a9b..13fb2ce 100644 --- a/cloudwatch_event_rules.tf +++ b/cloudwatch_event_rules.tf @@ -24,6 +24,7 @@ resource "aws_cloudwatch_event_rule" "lambda" { resource "aws_cloudwatch_event_target" "lambda" { for_each = var.cloudwatch_event_rules + event_bus_name = lookup(each.value, "event_bus_name", null) arn = lookup(each.value, "cloudwatch_event_target_arn", local.function_arn) rule = aws_cloudwatch_event_rule.lambda[each.key].name From 042f8778ba3cc5a593808b8331424afd35016889 Mon Sep 17 00:00:00 2001 From: build-tools-test Date: Thu, 6 Apr 2023 09:13:23 -0500 Subject: [PATCH 4/4] pre-commit hooks --- cloudwatch_event_rules.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudwatch_event_rules.tf b/cloudwatch_event_rules.tf index 13fb2ce..efc03ec 100644 --- a/cloudwatch_event_rules.tf +++ b/cloudwatch_event_rules.tf @@ -23,7 +23,7 @@ resource "aws_cloudwatch_event_rule" "lambda" { } resource "aws_cloudwatch_event_target" "lambda" { - for_each = var.cloudwatch_event_rules + for_each = var.cloudwatch_event_rules event_bus_name = lookup(each.value, "event_bus_name", null) arn = lookup(each.value, "cloudwatch_event_target_arn", local.function_arn)