File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 55}
66
77# Lambda definition
8- resource "aws_lambda_function" "check_sgs " {
8+ resource "aws_lambda_function" "lambda_function " {
99 filename = var. output_path
1010 function_name = var. function_name
1111 source_code_hash = var. source_code_hash
@@ -87,7 +87,7 @@ resource "aws_iam_policy" "dynamodb-policy" {
8787resource "aws_lambda_permission" "allow_cloudwatch_to_call_lambda" {
8888 statement_id = " AllowExecutionFromCloudWatch"
8989 action = " lambda:InvokeFunction"
90- function_name = aws_lambda_function. check_sgs . function_name
90+ function_name = aws_lambda_function. lambda_function . function_name
9191 principal = " events.amazonaws.com"
9292 source_arn = aws_cloudwatch_event_rule. event_rule . arn
9393}
@@ -121,5 +121,5 @@ resource "aws_cloudwatch_event_target" "sg_checker_target" {
121121 ]
122122 rule = aws_cloudwatch_event_rule. event_rule . name
123123 target_id = " lambda"
124- arn = aws_lambda_function. check_sgs . arn
124+ arn = aws_lambda_function. lambda_function . arn
125125}
You can’t perform that action at this time.
0 commit comments