From 0533deed693e1c759fbe9a2d8b3b1cc3fbfeb6fd Mon Sep 17 00:00:00 2001 From: Ryan Whorton Date: Thu, 26 Dec 2024 11:32:49 -0500 Subject: [PATCH] INFRASTRUCTURE: updating some naming to account for all environments --- terraform/api-gateway/api-gateway.tf | 2 +- terraform/api-gateway/api-lambda.tf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/terraform/api-gateway/api-gateway.tf b/terraform/api-gateway/api-gateway.tf index 1bbd438..21daa19 100644 --- a/terraform/api-gateway/api-gateway.tf +++ b/terraform/api-gateway/api-gateway.tf @@ -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}" } \ No newline at end of file diff --git a/terraform/api-gateway/api-lambda.tf b/terraform/api-gateway/api-lambda.tf index f38ff16..8eb9fec 100644 --- a/terraform/api-gateway/api-lambda.tf +++ b/terraform/api-gateway/api-lambda.tf @@ -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" } \ No newline at end of file