Skip to content

Commit c0fe919

Browse files
committed
update toplevel modules
1 parent e41af5e commit c0fe919

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

examples/default/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ module "runners" {
9797
# prefix GitHub runners with the environment name
9898
runner_name_prefix = "${local.environment}_"
9999

100+
# webhook supports to modes, either direct or via the eventbridge
101+
webhook_mode = "eventbridge" # or "direct"
102+
100103
# Enable debug logging for the lambda functions
101104
log_level = "debug"
102105

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ module "ssm" {
123123

124124
module "webhook" {
125125
source = "./modules/webhook"
126+
127+
mode = var.webhook_mode
126128
ssm_paths = {
127129
root = local.ssm_root_path
128130
webhook = var.ssm_paths.webhook

modules/multi-runner/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,18 @@ variable "lambda_s3_bucket" {
271271
default = null
272272
}
273273

274+
275+
variable "webhook_mode" {
276+
description = "The webhook and dispatching to runner queues supports two modes. Direct messages, are delivered directly to the runner queues. EventBridge messages are delivered to an EventBridge bus and then dispatched to the runner queues. Valid values are `direct` and `eventbridge`."
277+
type = string
278+
default = "direct"
279+
280+
validation {
281+
condition = contains(["direct", "eventbridge"], var.webhook_mode)
282+
error_message = "`mode` value is not valid, valid values are: `direct`, and `eventbridge`."
283+
}
284+
}
285+
274286
variable "webhook_lambda_s3_key" {
275287
description = "S3 key for webhook lambda function. Required if using S3 bucket to specify lambdas."
276288
type = string

modules/multi-runner/webhook.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module "webhook" {
22
source = "../webhook"
33
prefix = var.prefix
44
tags = local.tags
5+
mode = var.webhook_mode
56
kms_key_arn = var.kms_key_arn
67

78
runner_matcher_config = local.runner_config

0 commit comments

Comments
 (0)