diff --git a/README.md b/README.md index 9d01584ec3..fbc4385729 100644 --- a/README.md +++ b/README.md @@ -347,6 +347,7 @@ No requirements. | 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 | | 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 | | 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 | +| 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 | | 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 | | enable\_organization\_runners | Register runners to organization, instead of repo level | `bool` | `false` | no | | 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. | manage\_kms\_key | Let the module manage the KMS key. | `bool` | `true` | no | | 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 | | minimum\_running\_time\_in\_minutes | The time an ec2 action runner should be running at minimum before terminated if non busy. | `number` | `5` | no | -| 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 | +| repository\_white\_list | List of repositories allowed to use the github app | `list(string)` | `[]` | no | | 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 | | role\_permissions\_boundary | Permissions boundary that will be added to the created roles. | `string` | `null` | no | | runner\_additional\_security\_group\_ids | (optional) List of additional security groups IDs to apply to the runner | `list(string)` | `[]` | no | diff --git a/main.tf b/main.tf index 096e0cccd0..338351981a 100644 --- a/main.tf +++ b/main.tf @@ -17,7 +17,7 @@ resource "random_string" "random" { resource "aws_sqs_queue" "queued_builds" { name = "${var.environment}-queued-builds.fifo" - delay_seconds = 30 + delay_seconds = var.delay_webhook_event visibility_timeout_seconds = var.runners_scale_up_lambda_timeout fifo_queue = true receive_wait_time_seconds = 10 diff --git a/variables.tf b/variables.tf index 55969b6cec..c381581354 100644 --- a/variables.tf +++ b/variables.tf @@ -366,3 +366,9 @@ variable "repository_white_list" { type = list(string) default = [] } + +variable "delay_webhook_event" { + 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." + type = number + default = 30 +}