From 8fcf420a47b3cf975c43ce0e07d75d62106939b3 Mon Sep 17 00:00:00 2001 From: Tony Duong Date: Wed, 8 Nov 2023 22:49:13 +0900 Subject: [PATCH] :sparkles: change name of variable --- .gitignore | 2 +- terraform/main.tf | 6 +++--- terraform/modules/api-gateway/main.tf | 2 +- terraform/modules/api-gateway/variables.tf | 2 +- terraform/modules/eventbridge/main.tf | 4 ++-- terraform/modules/eventbridge/variables.tf | 4 ++-- terraform/modules/lambda/outputs.tf | 6 +++--- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 5ae1eed..fc33b78 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ terraform.rc .env # Ignore the output folder (only used for local testing) -lambda-jobs/output +lambda-jobs/outputs # Ignore .terraform directories **/.terraform/* diff --git a/terraform/main.tf b/terraform/main.tf index eaee520..9dba6bd 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -1,7 +1,7 @@ module "api-gateway" { source = "./modules/api-gateway" - aws_lambda_function_invoke_arn = module.lambda.aws_lambda_function_invoke_arn + lgtm_api_aws_lambda_function_invoke_arn = module.lambda.lgtm_api_aws_lambda_function_invoke_arn } module "cloudfront" { @@ -14,8 +14,8 @@ module "cloudfront" { module "eventbridge" { source = "./modules/eventbridge" - aws_lambda_function_arn = module.lambda.aws_lambda_function_arn - aws_lambda_function_name = module.lambda.aws_lambda_function_name + lgtm_job_aws_lambda_function_arn = module.lambda.lgtm_job_aws_lambda_function_arn + lgtm_job_aws_lambda_function_name = module.lambda.lgtm_job_aws_lambda_function_name } module "ecr" { diff --git a/terraform/modules/api-gateway/main.tf b/terraform/modules/api-gateway/main.tf index 76dad0d..eaad09e 100644 --- a/terraform/modules/api-gateway/main.tf +++ b/terraform/modules/api-gateway/main.tf @@ -15,7 +15,7 @@ resource "aws_api_gateway_rest_api" "lgtm_api_aws_api_gateway_rest_api" { httpMethod = "POST" payloadFormatVersion = "1.0" type = "AWS_PROXY" - uri = var.aws_lambda_function_invoke_arn # aws_lambda_function.lgtm_api_aws_lambda_function.invoke_arn + uri = var.lgtm_api_aws_lambda_function_invoke_arn # aws_lambda_function.lgtm_api_aws_lambda_function.invoke_arn credentials = aws_iam_role.lgtm_api_gateway_aws_iam_role.arn } } diff --git a/terraform/modules/api-gateway/variables.tf b/terraform/modules/api-gateway/variables.tf index 9422bc7..26180f9 100644 --- a/terraform/modules/api-gateway/variables.tf +++ b/terraform/modules/api-gateway/variables.tf @@ -1,4 +1,4 @@ -variable "aws_lambda_function_invoke_arn" { +variable "lgtm_api_aws_lambda_function_invoke_arn" { description = "ARN of the Lambda function to invoke" type = string } diff --git a/terraform/modules/eventbridge/main.tf b/terraform/modules/eventbridge/main.tf index a248970..571b700 100644 --- a/terraform/modules/eventbridge/main.tf +++ b/terraform/modules/eventbridge/main.tf @@ -8,7 +8,7 @@ resource "aws_cloudwatch_event_rule" "lgtm_job_aws_cloudwatch_event_rule" { # Create a target for the EventBridge rule to trigger the Lambda function with a payload resource "aws_cloudwatch_event_target" "lgtm_job_aws_cloudwatch_event_target" { rule = aws_cloudwatch_event_rule.lgtm_job_aws_cloudwatch_event_rule.name - arn = var.aws_lambda_function_arn + arn = var.lgtm_job_aws_lambda_function_arn target_id = "lgtm-tonystrawberry-codes-job" input = <