From a0b66d070a63412e8a0e6ff3adae9443a3fca870 Mon Sep 17 00:00:00 2001 From: Niek Palm Date: Thu, 7 Nov 2024 18:07:07 +0100 Subject: [PATCH] fix: trigger cold start dispatcher after update SSM paramates --- modules/webhook/direct/main.tf | 6 ------ modules/webhook/direct/webhook.tf | 5 +++-- 2 files changed, 3 insertions(+), 8 deletions(-) delete mode 100644 modules/webhook/direct/main.tf diff --git a/modules/webhook/direct/main.tf b/modules/webhook/direct/main.tf deleted file mode 100644 index 9937792f5e..0000000000 --- a/modules/webhook/direct/main.tf +++ /dev/null @@ -1,6 +0,0 @@ - -resource "null_resource" "ssm_parameter_runner_matcher_config" { - triggers = { - version = var.config.ssm_parameter_runner_matcher_config.version - } -} diff --git a/modules/webhook/direct/webhook.tf b/modules/webhook/direct/webhook.tf index 77ecbb8d44..0bb9a88445 100644 --- a/modules/webhook/direct/webhook.tf +++ b/modules/webhook/direct/webhook.tf @@ -28,6 +28,7 @@ resource "aws_lambda_function" "webhook" { REPOSITORY_ALLOW_LIST = jsonencode(var.config.repository_white_list) SQS_WORKFLOW_JOB_QUEUE = try(var.config.sqs_workflow_job_queue.id, null) PARAMETER_RUNNER_MATCHER_CONFIG_PATH = var.config.ssm_parameter_runner_matcher_config.name + PARAMETER_RUNNER_MATCHER_VERSION = var.config.ssm_parameter_runner_matcher_config.version # enforce cold start after Changes in SSM parameter } : k => v if v != null } } @@ -50,7 +51,7 @@ resource "aws_lambda_function" "webhook" { } lifecycle { - replace_triggered_by = [null_resource.ssm_parameter_runner_matcher_config, null_resource.github_app_parameters] + replace_triggered_by = [null_resource.github_app_parameters] } } @@ -68,7 +69,7 @@ resource "aws_lambda_permission" "webhook" { principal = "apigateway.amazonaws.com" source_arn = var.config.api_gw_source_arn lifecycle { - replace_triggered_by = [null_resource.ssm_parameter_runner_matcher_config, null_resource.github_app_parameters] + replace_triggered_by = [null_resource.github_app_parameters] } }