File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,14 +6,14 @@ module "eventbridge" {
66 create_bus = false
77
88 rules = {
9- crons = {
10- description = " Trigger for Lambda Function"
9+ " ${var.lambda_name}- crons" = {
10+ description = " Trigger for ${ var . lambda_name } Function"
1111 schedule_expression = var.schedule
1212 }
1313 }
1414
1515 targets = {
16- crons = [
16+ " ${var.lambda_name}- crons" = [
1717 {
1818 name = " ${ var . lambda_name } -function-cron"
1919 arn = aws_lambda_function.lambda_function.arn
@@ -28,5 +28,5 @@ resource "aws_lambda_permission" "allow_eventbridge_to_invoke_lambda" {
2828 action = " lambda:InvokeFunction"
2929 function_name = aws_lambda_function. lambda_function . arn
3030 principal = " events.amazonaws.com"
31- source_arn = module. eventbridge . eventbridge_rules [" crons" ][" arn" ]
31+ source_arn = module. eventbridge . eventbridge_rules [" ${ var . lambda_name } - crons" ][" arn" ]
3232}
Original file line number Diff line number Diff line change @@ -15,5 +15,5 @@ output "repo_name" {
1515}
1616
1717output "rule_arn" {
18- value = module. eventbridge . eventbridge_rules [" crons" ][" arn" ]
18+ value = module. eventbridge . eventbridge_rules [" ${ var . lambda_name } - crons" ][" arn" ]
1919}
You can’t perform that action at this time.
0 commit comments