Skip to content

Commit

Permalink
fix: trigger cold start dispatcher after update SSM paramates
Browse files Browse the repository at this point in the history
  • Loading branch information
npalm committed Nov 7, 2024
1 parent 146b740 commit a0b66d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 0 additions & 6 deletions modules/webhook/direct/main.tf

This file was deleted.

5 changes: 3 additions & 2 deletions modules/webhook/direct/webhook.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand All @@ -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]
}
}

Expand All @@ -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]
}
}

Expand Down

0 comments on commit a0b66d0

Please sign in to comment.