File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
apigw-http-eventbridge-terraform Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ terraform {
22 required_providers {
33 aws = {
44 source = " hashicorp/aws"
5- version = " ~> 3.27 "
5+ version = " ~> 6 "
66 }
77 }
88
@@ -54,7 +54,7 @@ resource "aws_iam_policy" "APIGWPolicy" {
5454 "Action" : [
5555 "events:PutEvents"
5656 ],
57- "Resource" : "arn:aws:events:${ data . aws_region . current . name } :${ data . aws_caller_identity . current . account_id } :event-bus/default"
57+ "Resource" : "arn:aws:events:${ data . aws_region . current . region } :${ data . aws_caller_identity . current . account_id } :event-bus/default"
5858 }
5959 ]
6060}
@@ -97,7 +97,7 @@ resource "aws_iam_policy" "LambdaPolicy" {
9797 "logs:CreateLogStream",
9898 "logs:PutLogEvents"
9999 ],
100- "Resource" : "arn:aws:logs:${ data . aws_region . current . name } :${ data . aws_caller_identity . current . account_id } :log-group:/aws/lambda/${ aws_lambda_function . MyLambdaFunction . function_name } :*:*"
100+ "Resource" : "arn:aws:logs:${ data . aws_region . current . region } :${ data . aws_caller_identity . current . account_id } :log-group:/aws/lambda/${ aws_lambda_function . MyLambdaFunction . function_name } :*:*"
101101 }
102102 ]
103103}
@@ -183,7 +183,7 @@ resource "aws_lambda_function" "MyLambdaFunction" {
183183 role = aws_iam_role. LambdaRole . arn
184184 handler = " LambdaFunction.lambda_handler"
185185 runtime = " python3.14"
186- layers = [" arn:aws:lambda:${ data . aws_region . current . name } :017000801446:layer:AWSLambdaPowertoolsPython:15" ]
186+ layers = [" arn:aws:lambda:${ data . aws_region . current . region } :017000801446:layer:AWSLambdaPowertoolsPython:15" ]
187187}
188188
189189# Allow the EventBridge rule created to invoke the Lambda function
@@ -208,4 +208,4 @@ output "LambdaFunctionName" {
208208output "CloudWatchLogName" {
209209 value = " /aws/lambda/${ aws_lambda_function . MyLambdaFunction . function_name } "
210210 description = " The Lambda Function Log Group"
211- }
211+ }
You can’t perform that action at this time.
0 commit comments