Skip to content

Commit

Permalink
Remove function URLs
Browse files Browse the repository at this point in the history
Not needed now we use API Gateway

#patch
  • Loading branch information
gregtyler committed Oct 23, 2023
1 parent 50050f3 commit 4b93954
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 34 deletions.
5 changes: 0 additions & 5 deletions terraform/environment/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
output "lambda_url" {
description = "Public URL of 'create' Lambda function"
value = module.eu_west_1.lambda_url
}

output "base_url" {
description = "Base URL of API"
value = module.eu_west_1.base_url
Expand Down
5 changes: 0 additions & 5 deletions terraform/environment/region/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
output "lambda_url" {
description = "Public URL of 'create' Lambda function"
value = module.lambda["create"].function_url
}

output "base_url" {
value = aws_api_gateway_stage.current.invoke_url
}
14 changes: 0 additions & 14 deletions terraform/modules/lambda/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,3 @@ resource "aws_lambda_permission" "allow_lambda_execution_operator" {
function_name = aws_lambda_function.main.function_name
principal = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/operator"
}

resource "aws_lambda_permission" "allow_lambda_url_execution_operator" {
statement_id = "AllowUrlExecutionOperator"
action = "lambda:InvokeFunctionUrl"
function_name = aws_lambda_function.main.function_name
principal = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/operator"
}

resource "aws_lambda_permission" "allow_lambda_url_execution_ci" {
statement_id = "AllowUrlExecutionCI"
action = "lambda:InvokeFunctionUrl"
function_name = aws_lambda_function.main.function_name
principal = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/lpa-store-ci"
}
5 changes: 0 additions & 5 deletions terraform/modules/lambda/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,3 @@ resource "aws_lambda_function" "main" {
}
}
}

resource "aws_lambda_function_url" "main" {
function_name = aws_lambda_function.main.function_name
authorization_type = "AWS_IAM"
}
5 changes: 0 additions & 5 deletions terraform/modules/lambda/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
output "function_url" {
description = "Public URL of Lambda function"
value = aws_lambda_function_url.main.function_url
}

output "iam_role_id" {
description = "ID of IAM role created for lambda"
value = aws_iam_role.lambda.id
Expand Down

0 comments on commit 4b93954

Please sign in to comment.