Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 92a0d8a

Browse files
committed
feat: make delay of webhook event configurable (#990)
1 parent 7572405 commit 92a0d8a

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Diff for: README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ No requirements.
347347
| block\_device\_mappings | The EC2 instance block device configuration. Takes the following keys: `device_name`, `delete_on_termination`, `volume_type`, `volume_size`, `encrypted`, `iops` | `map(string)` | `{}` | no |
348348
| cloudwatch\_config | (optional) Replaces the module default cloudwatch log config. See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-Configuration-File-Details.html for details. | `string` | `null` | no |
349349
| create\_service\_linked\_role\_spot | (optional) create the serviced linked role for spot instances that is required by the scale-up lambda. | `bool` | `false` | no |
350+
| delay\_webhook\_event | The number of seconds the event accepted by the webhook is invisible on the queue before the scale up lambda will receive the event. | `number` | `30` | no |
350351
| enable\_cloudwatch\_agent | Enabling the cloudwatch agent on the ec2 runner instances, the runner contains default config. Configuration can be overridden via `cloudwatch_config`. | `bool` | `true` | no |
351352
| enable\_organization\_runners | Register runners to organization, instead of repo level | `bool` | `false` | no |
352353
| enable\_ssm\_on\_runners | Enable to allow access the runner instances for debugging purposes via SSM. Note that this adds additional permissions to the runner instances. | `bool` | `false` | no |
@@ -367,7 +368,7 @@ No requirements.
367368
| manage\_kms\_key | Let the module manage the KMS key. | `bool` | `true` | no |
368369
| market\_options | Market options for the action runner instances. Setting the value to `null` let the scaler create on-demand instances instead of spot instances. | `string` | `"spot"` | no |
369370
| minimum\_running\_time\_in\_minutes | The time an ec2 action runner should be running at minimum before terminated if non busy. | `number` | `5` | no |
370-
| repository\_white\_list | (optional) List of github repository full names (owner/repo_name) that will be allowed to call the runners. Leave empty for no filtering | `list(string)` | `[]` | no |
371+
| repository\_white\_list | List of repositories allowed to use the github app | `list(string)` | `[]` | no |
371372
| role\_path | The path that will be added to role path for created roles, if not set the environment name will be used. | `string` | `null` | no |
372373
| role\_permissions\_boundary | Permissions boundary that will be added to the created roles. | `string` | `null` | no |
373374
| runner\_additional\_security\_group\_ids | (optional) List of additional security groups IDs to apply to the runner | `list(string)` | `[]` | no |

Diff for: main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ resource "random_string" "random" {
1717

1818
resource "aws_sqs_queue" "queued_builds" {
1919
name = "${var.environment}-queued-builds.fifo"
20-
delay_seconds = 30
20+
delay_seconds = var.delay_webhook_event
2121
visibility_timeout_seconds = var.runners_scale_up_lambda_timeout
2222
fifo_queue = true
2323
receive_wait_time_seconds = 10

Diff for: variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -366,3 +366,9 @@ variable "repository_white_list" {
366366
type = list(string)
367367
default = []
368368
}
369+
370+
variable "delay_webhook_event" {
371+
description = "The number of seconds the event accepted by the webhook is invisible on the queue before the scale up lambda will receive the event."
372+
type = number
373+
default = 30
374+
}

0 commit comments

Comments
 (0)