Skip to content

Commit 21ee3d5

Browse files
authored
Merge pull request #2 from byu-oit/permission-source-arn
simplify lambda permission source arn
2 parents 3bc18e3 + 1bde3c5 commit 21ee3d5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

main.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//TODO: maybe move to single repo using github pages
21
module "acs" {
32
source = "github.com/byu-oit/terraform-aws-acs-info.git?ref=v2.1.0"
43
vpc_vpn_to_campus = true
@@ -147,9 +146,8 @@ resource "aws_lambda_permission" "apigw_lambda" {
147146
action = "lambda:InvokeFunction"
148147
function_name = aws_lambda_function.lambda.function_name
149148
principal = "apigateway.amazonaws.com"
150-
source_arn = "arn:aws:execute-api:us-west-2:${var.account-id}:${aws_api_gateway_rest_api.api.id}/*"
149+
source_arn = aws_api_gateway_rest_api.api.execution_arn
151150
depends_on = [aws_iam_role_policy_attachment.lambda_logs, aws_cloudwatch_log_group.logs]
152-
153151
}
154152

155153
resource "aws_api_gateway_domain_name" "api_domain" {

0 commit comments

Comments
 (0)