Skip to content

Commit

Permalink
INFRASTRUCTURE: updating some naming to account for all environments
Browse files Browse the repository at this point in the history
  • Loading branch information
rwhorton66 committed Dec 26, 2024
1 parent 1b7898c commit 0533dee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion terraform/api-gateway/api-gateway.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "aws_apigatewayv2_integration" "geo" {

resource "aws_apigatewayv2_route" "geo" {
api_id = aws_apigatewayv2_api.geo.id
route_key = "GET /geographic-detail"
route_key = "GET /geographic-details"

target = "integrations/${aws_apigatewayv2_integration.geo.id}"
}
4 changes: 2 additions & 2 deletions terraform/api-gateway/api-lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ resource "aws_iam_role_policy_attachment" "api" {
}

resource "aws_lambda_permission" "api_permission" {
statement_id = "AllowMyDemoAPIInvoke"
statement_id = "AllowMy${terraform.workspace}APIInvoke"
action = "lambda:InvokeFunction"
function_name = aws_lambda_function.api.function_name
principal = "apigateway.amazonaws.com"

# The /* part allows invocation from any stage, method and resource path
# within API Gateway.
source_arn = "${aws_apigatewayv2_api.geo.execution_arn}/${terraform.workspace}/GET/geographic-detail"
source_arn = "${aws_apigatewayv2_api.geo.execution_arn}/${terraform.workspace}/GET/geographic-details"
}

0 comments on commit 0533dee

Please sign in to comment.