From 0006ab9fb5880fb1daf31b3e1b8d218e7b86105b Mon Sep 17 00:00:00 2001 From: Piotr Galar Date: Mon, 22 Apr 2024 17:20:32 +0200 Subject: [PATCH] fix: webhook expects REPOSITORY_ALLOW_LIST env var (#3856) #### Description The `ConfigResolver` of the webhook lambda expects the env variable to be named `REPOSITORY_ALLOW_LIST` (see https://github.com/philips-labs/terraform-aws-github-runner/blob/1e40ecda859e961679f80a16135e23e9d8e4a2dd/lambdas/functions/webhook/src/ConfigResolver.ts#L18) whereas the one set by the `webhook` module was `REPOSITORY_WHITE_LIST`. I think it'd be great to follow up on https://github.com/philips-labs/terraform-aws-github-runner/issues/992, but it is beyond the scope of the fix proposed here now. --- modules/webhook/webhook.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/webhook/webhook.tf b/modules/webhook/webhook.tf index 6b90839054..b0f1022475 100644 --- a/modules/webhook/webhook.tf +++ b/modules/webhook/webhook.tf @@ -29,7 +29,7 @@ resource "aws_lambda_function" "webhook" { POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS = var.tracing_config.capture_http_requests POWERTOOLS_TRACER_CAPTURE_ERROR = var.tracing_config.capture_error PARAMETER_GITHUB_APP_WEBHOOK_SECRET = var.github_app_parameters.webhook_secret.name - REPOSITORY_WHITE_LIST = jsonencode(var.repository_white_list) + REPOSITORY_ALLOW_LIST = jsonencode(var.repository_white_list) SQS_WORKFLOW_JOB_QUEUE = try(var.sqs_workflow_job_queue, null) != null ? var.sqs_workflow_job_queue.id : "" PARAMETER_RUNNER_MATCHER_CONFIG_PATH = aws_ssm_parameter.runner_matcher_config.name }