Skip to content

Commit 1ec53e3

Browse files
authored
Merge pull request #5 from non-existing-organization/feature/modify-tf-resources-and-readme
check-sgs to lambda_function name
2 parents 77f5ec3 + a19f052 commit 1ec53e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ locals {
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" {
8787
resource "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
}

0 commit comments

Comments
 (0)