diff --git a/README.md b/README.md index ba1ab0a287..6040980a81 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,7 @@ Talk to the forestkeepers in the `runners-channel` on Slack. | [logging\_retention\_in\_days](#input\_logging\_retention\_in\_days) | Specifies the number of days you want to retain log events for the lambda log group. Possible values are: 0, 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653. | `number` | `180` | no | | [minimum\_running\_time\_in\_minutes](#input\_minimum\_running\_time\_in\_minutes) | The time an ec2 action runner should be running at minimum before terminated, if not busy. | `number` | `null` | no | | [pool\_config](#input\_pool\_config) | The configuration for updating the pool. The `pool_size` to adjust to by the events triggered by the `schedule_expression`. For example you can configure a cron expression for weekdays to adjust the pool to 10 and another expression for the weekend to adjust the pool to 1. |
list(object({
schedule_expression = string
size = number
}))
| `[]` | no | +| [pool\_lambda\_memory\_size](#input\_pool\_lambda\_memory\_size) | Memory size limit for scale-up lambda. | `number` | `512` | no | | [pool\_lambda\_reserved\_concurrent\_executions](#input\_pool\_lambda\_reserved\_concurrent\_executions) | Amount of reserved concurrent executions for the scale-up lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. | `number` | `1` | no | | [pool\_lambda\_timeout](#input\_pool\_lambda\_timeout) | Time out for the pool lambda in seconds. | `number` | `60` | no | | [pool\_runner\_owner](#input\_pool\_runner\_owner) | The pool will deploy runners to the GitHub org ID, set this value to the org to which you want the runners deployed. Repo level is not supported. | `string` | `null` | no | @@ -195,6 +196,7 @@ Talk to the forestkeepers in the `runners-channel` on Slack. | [runner\_binaries\_s3\_logging\_bucket\_prefix](#input\_runner\_binaries\_s3\_logging\_bucket\_prefix) | Bucket prefix for action runner distribution bucket access logging. | `string` | `null` | no | | [runner\_binaries\_s3\_sse\_configuration](#input\_runner\_binaries\_s3\_sse\_configuration) | Map containing server-side encryption configuration for runner-binaries S3 bucket. | `any` |
{
"rule": {
"apply_server_side_encryption_by_default": {
"sse_algorithm": "AES256"
}
}
}
| no | | [runner\_binaries\_s3\_versioning](#input\_runner\_binaries\_s3\_versioning) | Status of S3 versioning for runner-binaries S3 bucket. Once set to Enabled the change cannot be reverted via Terraform! | `string` | `"Disabled"` | no | +| [runner\_binaries\_syncer\_lambda\_memory\_size](#input\_runner\_binaries\_syncer\_lambda\_memory\_size) | Memory size limit in MB for binary syncer lambda. | `number` | `256` | no | | [runner\_binaries\_syncer\_lambda\_timeout](#input\_runner\_binaries\_syncer\_lambda\_timeout) | Time out of the binaries sync lambda in seconds. | `number` | `300` | no | | [runner\_binaries\_syncer\_lambda\_zip](#input\_runner\_binaries\_syncer\_lambda\_zip) | File location of the binaries sync lambda zip file. | `string` | `null` | no | | [runner\_boot\_time\_in\_minutes](#input\_runner\_boot\_time\_in\_minutes) | The minimum time for an EC2 runner to boot and register as a runner. | `number` | `5` | no | @@ -213,9 +215,11 @@ Talk to the forestkeepers in the `runners-channel` on Slack. | [runners\_lambda\_s3\_object\_version](#input\_runners\_lambda\_s3\_object\_version) | S3 object version for runners lambda function. Useful if S3 versioning is enabled on source bucket. | `string` | `null` | no | | [runners\_lambda\_zip](#input\_runners\_lambda\_zip) | File location of the lambda zip file for scaling runners. | `string` | `null` | no | | [runners\_maximum\_count](#input\_runners\_maximum\_count) | The maximum number of runners that will be created. | `number` | `3` | no | +| [runners\_scale\_down\_lambda\_memory\_size](#input\_runners\_scale\_down\_lambda\_memory\_size) | Memory size limit in MB for scale-down lambda. | `number` | `512` | no | | [runners\_scale\_down\_lambda\_timeout](#input\_runners\_scale\_down\_lambda\_timeout) | Time out for the scale down lambda in seconds. | `number` | `60` | no | +| [runners\_scale\_up\_Lambda\_memory\_size](#input\_runners\_scale\_up\_Lambda\_memory\_size) | Memory size limit in MB for scale-up lambda. | `number` | `512` | no | | [runners\_scale\_up\_lambda\_timeout](#input\_runners\_scale\_up\_lambda\_timeout) | Time out for the scale up lambda in seconds. | `number` | `30` | no | -| [runners\_ssm\_housekeeper](#input\_runners\_ssm\_housekeeper) | Configuration for the SSM housekeeper lambda. This lambda deletes token / JIT config from SSM.

`schedule_expression`: is used to configure the schedule for the lambda.
`enabled`: enable or disable the lambda trigger via the EventBridge.
`lambda_timeout`: timeout for the lambda in seconds.
`config`: configuration for the lambda function. Token path will be read by default from the module. |
object({
schedule_expression = optional(string, "rate(1 day)")
enabled = optional(bool, true)
lambda_timeout = optional(number, 60)
config = object({
tokenPath = optional(string)
minimumDaysOld = optional(number, 1)
dryRun = optional(bool, false)
})
})
|
{
"config": {}
}
| no | +| [runners\_ssm\_housekeeper](#input\_runners\_ssm\_housekeeper) | Configuration for the SSM housekeeper lambda. This lambda deletes token / JIT config from SSM.

`schedule_expression`: is used to configure the schedule for the lambda.
`enabled`: enable or disable the lambda trigger via the EventBridge.
`lambda_memory_size`: lambda memery size limit.
`lambda_timeout`: timeout for the lambda in seconds.
`config`: configuration for the lambda function. Token path will be read by default from the module. |
object({
schedule_expression = optional(string, "rate(1 day)")
enabled = optional(bool, true)
lambda_memory_size = optional(number, 512)
lambda_timeout = optional(number, 60)
config = object({
tokenPath = optional(string)
minimumDaysOld = optional(number, 1)
dryRun = optional(bool, false)
})
})
|
{
"config": {}
}
| no | | [scale\_down\_schedule\_expression](#input\_scale\_down\_schedule\_expression) | Scheduler expression to check every x for scale down. | `string` | `"cron(*/5 * * * ? *)"` | no | | [scale\_up\_reserved\_concurrent\_executions](#input\_scale\_up\_reserved\_concurrent\_executions) | Amount of reserved concurrent executions for the scale-up lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. | `number` | `1` | no | | [ssm\_paths](#input\_ssm\_paths) | The root path used in SSM to store configuration and secrets. |
object({
root = optional(string, "github-action-runners")
app = optional(string, "app")
runners = optional(string, "runners")
webhook = optional(string, "webhook")
use_prefix = optional(bool, true)
})
| `{}` | no | @@ -230,6 +234,7 @@ Talk to the forestkeepers in the `runners-channel` on Slack. | [userdata\_template](#input\_userdata\_template) | Alternative user-data template, replacing the default template. By providing your own user\_data you have to take care of installing all required software, including the action runner. Variables userdata\_pre/post\_install are ignored. | `string` | `null` | no | | [vpc\_id](#input\_vpc\_id) | The VPC for security groups of the action runners. | `string` | n/a | yes | | [webhook\_lambda\_apigateway\_access\_log\_settings](#input\_webhook\_lambda\_apigateway\_access\_log\_settings) | Access log settings for webhook API gateway. |
object({
destination_arn = string
format = string
})
| `null` | no | +| [webhook\_lambda\_memory\_size](#input\_webhook\_lambda\_memory\_size) | Memory size limit in MB for webhook lambda in. | `number` | `256` | no | | [webhook\_lambda\_s3\_key](#input\_webhook\_lambda\_s3\_key) | S3 key for webhook lambda function. Required if using S3 bucket to specify lambdas. | `string` | `null` | no | | [webhook\_lambda\_s3\_object\_version](#input\_webhook\_lambda\_s3\_object\_version) | S3 object version for webhook lambda function. Useful if S3 versioning is enabled on source bucket. | `string` | `null` | no | | [webhook\_lambda\_timeout](#input\_webhook\_lambda\_timeout) | Time out of the webhook lambda in seconds. | `number` | `10` | no | diff --git a/main.tf b/main.tf index 4e9b7d0f26..19a89752de 100644 --- a/main.tf +++ b/main.tf @@ -155,6 +155,7 @@ module "webhook" { lambda_runtime = var.lambda_runtime lambda_architecture = var.lambda_architecture lambda_zip = var.webhook_lambda_zip + lambda_memory_size = var.webhook_lambda_memory_size lambda_timeout = var.webhook_lambda_timeout tracing_config = var.tracing_config logging_retention_in_days = var.logging_retention_in_days @@ -237,6 +238,8 @@ module "runners" { lambda_runtime = var.lambda_runtime lambda_architecture = var.lambda_architecture lambda_zip = var.runners_lambda_zip + lambda_scale_up_memory_size = var.runners_scale_up_Lambda_memory_size + lambda_scale_down_memory_size = var.runners_scale_down_lambda_memory_size lambda_timeout_scale_up = var.runners_scale_up_lambda_timeout lambda_timeout_scale_down = var.runners_scale_down_lambda_timeout lambda_subnet_ids = var.lambda_subnet_ids @@ -278,6 +281,7 @@ module "runners" { log_level = var.log_level pool_config = var.pool_config + pool_lambda_memory_size = var.pool_lambda_memory_size pool_lambda_timeout = var.pool_lambda_timeout pool_runner_owner = var.pool_runner_owner pool_lambda_reserved_concurrent_executions = var.pool_lambda_reserved_concurrent_executions @@ -306,6 +310,7 @@ module "runner_binaries" { lambda_runtime = var.lambda_runtime lambda_architecture = var.lambda_architecture lambda_zip = var.runner_binaries_syncer_lambda_zip + lambda_memory_size = var.runner_binaries_syncer_lambda_memory_size lambda_timeout = var.runner_binaries_syncer_lambda_timeout tracing_config = var.tracing_config logging_retention_in_days = var.logging_retention_in_days diff --git a/modules/ami-housekeeper/README.md b/modules/ami-housekeeper/README.md index 91f63ba61b..6c1ea32dda 100644 --- a/modules/ami-housekeeper/README.md +++ b/modules/ami-housekeeper/README.md @@ -103,6 +103,7 @@ No modules. | [aws\_partition](#input\_aws\_partition) | (optional) partition for the base arn if not 'aws' | `string` | `"aws"` | no | | [cleanup\_config](#input\_cleanup\_config) | Configuration for AMI cleanup.

`amiFilters` - Filters to use when searching for AMIs to cleanup. Default filter for images owned by the account and that are available.
`dryRun` - If true, no AMIs will be deregistered. Default false.
`launchTemplateNames` - Launch template names to use when searching for AMIs to cleanup. Default no launch templates.
`maxItems` - The maximum numer of AMI's tha will be queried for cleanup. Default no maximum.
`minimumDaysOld` - Minimum number of days old an AMI must be to be considered for cleanup. Default 30.
`ssmParameterNames` - SSM parameter names to use when searching for AMIs to cleanup. This parameter should be set when using SSM to configure the AMI to use. Default no SSM parameters. |
object({
amiFilters = optional(list(object({
Name = string
Values = list(string)
})),
[{
Name : "state",
Values : ["available"],
},
{
Name : "image-type",
Values : ["machine"],
}]
)
dryRun = optional(bool, false)
launchTemplateNames = optional(list(string))
maxItems = optional(number)
minimumDaysOld = optional(number, 30)
ssmParameterNames = optional(list(string))
})
| `{}` | no | | [lambda\_architecture](#input\_lambda\_architecture) | AWS Lambda architecture. Lambda functions using Graviton processors ('arm64') tend to have better price/performance than 'x86\_64' functions. | `string` | `"arm64"` | no | +| [lambda\_memory\_size](#input\_lambda\_memory\_size) | Memory size linit in MB of the lambda. | `number` | `256` | no | | [lambda\_principals](#input\_lambda\_principals) | (Optional) add extra principals to the role created for execution of the lambda, e.g. for local testing. |
list(object({
type = string
identifiers = list(string)
}))
| `[]` | no | | [lambda\_runtime](#input\_lambda\_runtime) | AWS Lambda runtime. | `string` | `"nodejs18.x"` | no | | [lambda\_s3\_bucket](#input\_lambda\_s3\_bucket) | S3 bucket from which to specify lambda functions. This is an alternative to providing local files directly. | `string` | `null` | no | diff --git a/modules/ami-housekeeper/main.tf b/modules/ami-housekeeper/main.tf index 373977c880..a5748351e7 100644 --- a/modules/ami-housekeeper/main.tf +++ b/modules/ami-housekeeper/main.tf @@ -14,7 +14,7 @@ resource "aws_lambda_function" "ami_housekeeper" { handler = "index.handler" runtime = var.lambda_runtime timeout = var.lambda_timeout - memory_size = 256 + memory_size = var.lambda_memory_size architectures = [var.lambda_architecture] environment { diff --git a/modules/ami-housekeeper/variables.tf b/modules/ami-housekeeper/variables.tf index 07ee374401..6ca031abeb 100644 --- a/modules/ami-housekeeper/variables.tf +++ b/modules/ami-housekeeper/variables.tf @@ -24,6 +24,12 @@ variable "lambda_timeout" { default = 60 } +variable "lambda_memory_size" { + description = "Memory size linit in MB of the lambda." + type = number + default = 256 +} + variable "role_permissions_boundary" { description = "Permissions boundary that will be added to the created role for the lambda." type = string diff --git a/modules/multi-runner/README.md b/modules/multi-runner/README.md index 9bf645cc0d..09f477ffbe 100644 --- a/modules/multi-runner/README.md +++ b/modules/multi-runner/README.md @@ -116,6 +116,7 @@ module "multi-runner" { | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [ami\_housekeeper\_cleanup\_config](#input\_ami\_housekeeper\_cleanup\_config) | Configuration for AMI cleanup. |
object({
maxItems = optional(number)
minimumDaysOld = optional(number)
amiFilters = optional(list(object({
Name = string
Values = list(string)
})))
launchTemplateNames = optional(list(string))
ssmParameterNames = optional(list(string))
dryRun = optional(bool)
})
| `{}` | no | +| [ami\_housekeeper\_lambda\_memory\_size](#input\_ami\_housekeeper\_lambda\_memory\_size) | Memory size linit in MB of the lambda. | `number` | `256` | no | | [ami\_housekeeper\_lambda\_s3\_key](#input\_ami\_housekeeper\_lambda\_s3\_key) | S3 key for syncer lambda function. Required if using S3 bucket to specify lambdas. | `string` | `null` | no | | [ami\_housekeeper\_lambda\_s3\_object\_version](#input\_ami\_housekeeper\_lambda\_s3\_object\_version) | S3 object version for syncer lambda function. Useful if S3 versioning is enabled on source bucket. | `string` | `null` | no | | [ami\_housekeeper\_lambda\_schedule\_expression](#input\_ami\_housekeeper\_lambda\_schedule\_expression) | Scheduler expression for action runner binary syncer. | `string` | `"cron(11 7 * * ? *)"` | no | @@ -156,13 +157,16 @@ module "multi-runner" { | [runner\_binaries\_s3\_versioning](#input\_runner\_binaries\_s3\_versioning) | Status of S3 versioning for runner-binaries S3 bucket. Once set to Enabled the change cannot be reverted via Terraform! | `string` | `"Disabled"` | no | | [runner\_binaries\_syncer\_lambda\_timeout](#input\_runner\_binaries\_syncer\_lambda\_timeout) | Time out of the binaries sync lambda in seconds. | `number` | `300` | no | | [runner\_binaries\_syncer\_lambda\_zip](#input\_runner\_binaries\_syncer\_lambda\_zip) | File location of the binaries sync lambda zip file. | `string` | `null` | no | +| [runner\_binaries\_syncer\_memory\_size](#input\_runner\_binaries\_syncer\_memory\_size) | Memory size limit in MB for binary syncer lambda. | `number` | `256` | no | | [runner\_egress\_rules](#input\_runner\_egress\_rules) | List of egress rules for the GitHub runner instances. |
list(object({
cidr_blocks = list(string)
ipv6_cidr_blocks = list(string)
prefix_list_ids = list(string)
from_port = number
protocol = string
security_groups = list(string)
self = bool
to_port = number
description = string
}))
|
[
{
"cidr_blocks": [
"0.0.0.0/0"
],
"description": null,
"from_port": 0,
"ipv6_cidr_blocks": [
"::/0"
],
"prefix_list_ids": null,
"protocol": "-1",
"security_groups": null,
"self": null,
"to_port": 0
}
]
| no | | [runners\_lambda\_s3\_key](#input\_runners\_lambda\_s3\_key) | S3 key for runners lambda function. Required if using S3 bucket to specify lambdas. | `string` | `null` | no | | [runners\_lambda\_s3\_object\_version](#input\_runners\_lambda\_s3\_object\_version) | S3 object version for runners lambda function. Useful if S3 versioning is enabled on source bucket. | `string` | `null` | no | | [runners\_lambda\_zip](#input\_runners\_lambda\_zip) | File location of the lambda zip file for scaling runners. | `string` | `null` | no | | [runners\_scale\_down\_lambda\_timeout](#input\_runners\_scale\_down\_lambda\_timeout) | Time out for the scale down lambda in seconds. | `number` | `60` | no | | [runners\_scale\_up\_lambda\_timeout](#input\_runners\_scale\_up\_lambda\_timeout) | Time out for the scale up lambda in seconds. | `number` | `30` | no | -| [runners\_ssm\_housekeeper](#input\_runners\_ssm\_housekeeper) | Configuration for the SSM housekeeper lambda. This lambda deletes token / JIT config from SSM.

`schedule_expression`: is used to configure the schedule for the lambda.
`enabled`: enable or disable the lambda trigger via the EventBridge.
`lambda_timeout`: timeout for the lambda in seconds.
`config`: configuration for the lambda function. Token path will be read by default from the module. |
object({
schedule_expression = optional(string, "rate(1 day)")
enabled = optional(bool, true)
lambda_timeout = optional(number, 60)
config = object({
tokenPath = optional(string)
minimumDaysOld = optional(number, 1)
dryRun = optional(bool, false)
})
})
|
{
"config": {}
}
| no | +| [runners\_ssm\_housekeeper](#input\_runners\_ssm\_housekeeper) | Configuration for the SSM housekeeper lambda. This lambda deletes token / JIT config from SSM.

`schedule_expression`: is used to configure the schedule for the lambda.
`enabled`: enable or disable the lambda trigger via the EventBridge.
`lambda_memory_size`: lambda memery size limit.
`lambda_timeout`: timeout for the lambda in seconds.
`config`: configuration for the lambda function. Token path will be read by default from the module. |
object({
schedule_expression = optional(string, "rate(1 day)")
enabled = optional(bool, true)
lambda_memory_size = optional(number, 512)
lambda_timeout = optional(number, 60)
config = object({
tokenPath = optional(string)
minimumDaysOld = optional(number, 1)
dryRun = optional(bool, false)
})
})
|
{
"config": {}
}
| no | +| [scale\_down\_lambda\_memory\_size](#input\_scale\_down\_lambda\_memory\_size) | Memory size limit in MB for scale down. | `number` | `512` | no | +| [scale\_up\_lambda\_memory\_size](#input\_scale\_up\_lambda\_memory\_size) | Memory size limit in MB for scale\_up lambda. | `number` | `512` | no | | [ssm\_paths](#input\_ssm\_paths) | The root path used in SSM to store configuration and secreets. |
object({
root = optional(string, "github-action-runners")
app = optional(string, "app")
runners = optional(string, "runners")
webhook = optional(string, "webhook")
})
| `{}` | no | | [state\_event\_rule\_binaries\_syncer](#input\_state\_event\_rule\_binaries\_syncer) | Option to disable EventBridge Lambda trigger for the binary syncer, useful to stop automatic updates of binary distribution | `string` | `"ENABLED"` | no | | [subnet\_ids](#input\_subnet\_ids) | List of subnets in which the action runners will be launched, the subnets needs to be subnets in the `vpc_id`. | `list(string)` | n/a | yes | @@ -172,6 +176,7 @@ module "multi-runner" { | [tracing\_config](#input\_tracing\_config) | Configuration for lambda tracing. |
object({
mode = optional(string, null)
capture_http_requests = optional(bool, false)
capture_error = optional(bool, false)
})
| `{}` | no | | [vpc\_id](#input\_vpc\_id) | The VPC for security groups of the action runners. | `string` | n/a | yes | | [webhook\_lambda\_apigateway\_access\_log\_settings](#input\_webhook\_lambda\_apigateway\_access\_log\_settings) | Access log settings for webhook API gateway. |
object({
destination_arn = string
format = string
})
| `null` | no | +| [webhook\_lambda\_memory\_size](#input\_webhook\_lambda\_memory\_size) | Memory size limit in MB for webhook lambda. | `number` | `256` | no | | [webhook\_lambda\_s3\_key](#input\_webhook\_lambda\_s3\_key) | S3 key for webhook lambda function. Required if using S3 bucket to specify lambdas. | `string` | `null` | no | | [webhook\_lambda\_s3\_object\_version](#input\_webhook\_lambda\_s3\_object\_version) | S3 object version for webhook lambda function. Useful if S3 versioning is enabled on source bucket. | `string` | `null` | no | | [webhook\_lambda\_timeout](#input\_webhook\_lambda\_timeout) | Time out of the lambda in seconds. | `number` | `10` | no | diff --git a/modules/multi-runner/ami-housekeeper.tf b/modules/multi-runner/ami-housekeeper.tf index cd40dddac7..dea5b0ab1d 100644 --- a/modules/multi-runner/ami-housekeeper.tf +++ b/modules/multi-runner/ami-housekeeper.tf @@ -17,6 +17,7 @@ module "ami_housekeeper" { lambda_runtime = var.lambda_runtime lambda_security_group_ids = var.lambda_security_group_ids lambda_subnet_ids = var.lambda_subnet_ids + lambda_memory_size = var.ami_housekeeper_lambda_memory_size lambda_timeout = var.ami_housekeeper_lambda_timeout tracing_config = var.tracing_config diff --git a/modules/multi-runner/runner-binaries.tf b/modules/multi-runner/runner-binaries.tf index 745efa9640..64ff73aaba 100644 --- a/modules/multi-runner/runner-binaries.tf +++ b/modules/multi-runner/runner-binaries.tf @@ -16,6 +16,7 @@ module "runner_binaries" { lambda_runtime = var.lambda_runtime lambda_architecture = var.lambda_architecture lambda_zip = var.runner_binaries_syncer_lambda_zip + lambda_memory_size = var.runner_binaries_syncer_memory_size lambda_timeout = var.runner_binaries_syncer_lambda_timeout tracing_config = var.tracing_config logging_retention_in_days = var.logging_retention_in_days diff --git a/modules/multi-runner/runners.tf b/modules/multi-runner/runners.tf index 59f9587916..65b9f2bd3c 100644 --- a/modules/multi-runner/runners.tf +++ b/modules/multi-runner/runners.tf @@ -63,7 +63,9 @@ module "runners" { lambda_runtime = var.lambda_runtime lambda_architecture = var.lambda_architecture lambda_zip = var.runners_lambda_zip + lambda_scale_up_memory_size = var.scale_up_lambda_memory_size lambda_timeout_scale_up = var.runners_scale_up_lambda_timeout + lambda_scale_down_memory_size = var.scale_down_lambda_memory_size lambda_timeout_scale_down = var.runners_scale_down_lambda_timeout lambda_subnet_ids = var.lambda_subnet_ids lambda_security_group_ids = var.lambda_security_group_ids diff --git a/modules/multi-runner/variables.ami-housekeepr.tf b/modules/multi-runner/variables.ami-housekeepr.tf index 0e26ec2a1a..f92211b6c0 100644 --- a/modules/multi-runner/variables.ami-housekeepr.tf +++ b/modules/multi-runner/variables.ami-housekeepr.tf @@ -11,6 +11,12 @@ variable "ami_housekeeper_lambda_zip" { default = null } +variable "ami_housekeeper_lambda_memory_size" { + description = "Memory size linit in MB of the lambda." + type = number + default = 256 +} + variable "ami_housekeeper_lambda_timeout" { description = "Time out of the lambda in seconds." type = number diff --git a/modules/multi-runner/variables.tf b/modules/multi-runner/variables.tf index 52d39b145a..cf06fc2977 100644 --- a/modules/multi-runner/variables.tf +++ b/modules/multi-runner/variables.tf @@ -189,12 +189,24 @@ variable "multi_runner_config" { EOT } +variable "scale_up_lambda_memory_size" { + description = "Memory size limit in MB for scale_up lambda." + type = number + default = 512 +} + variable "runners_scale_up_lambda_timeout" { description = "Time out for the scale up lambda in seconds." type = number default = 30 } +variable "scale_down_lambda_memory_size" { + description = "Memory size limit in MB for scale down." + type = number + default = 512 +} + variable "runners_scale_down_lambda_timeout" { description = "Time out for the scale down lambda in seconds." type = number @@ -207,6 +219,12 @@ variable "webhook_lambda_zip" { default = null } +variable "webhook_lambda_memory_size" { + description = "Memory size limit in MB for webhook lambda." + type = number + default = 256 +} + variable "webhook_lambda_timeout" { description = "Time out of the lambda in seconds." type = number @@ -337,6 +355,12 @@ variable "runner_binaries_s3_versioning" { default = "Disabled" } +variable "runner_binaries_syncer_memory_size" { + description = "Memory size limit in MB for binary syncer lambda." + type = number + default = 256 +} + variable "runner_binaries_syncer_lambda_timeout" { description = "Time out of the binaries sync lambda in seconds." type = number @@ -569,12 +593,14 @@ variable "runners_ssm_housekeeper" { `schedule_expression`: is used to configure the schedule for the lambda. `enabled`: enable or disable the lambda trigger via the EventBridge. + `lambda_memory_size`: lambda memery size limit. `lambda_timeout`: timeout for the lambda in seconds. `config`: configuration for the lambda function. Token path will be read by default from the module. EOF type = object({ schedule_expression = optional(string, "rate(1 day)") enabled = optional(bool, true) + lambda_memory_size = optional(number, 512) lambda_timeout = optional(number, 60) config = object({ tokenPath = optional(string) diff --git a/modules/multi-runner/webhook.tf b/modules/multi-runner/webhook.tf index 54ca3ef88d..96bcbdbc3e 100644 --- a/modules/multi-runner/webhook.tf +++ b/modules/multi-runner/webhook.tf @@ -23,6 +23,7 @@ module "webhook" { lambda_architecture = var.lambda_architecture lambda_zip = var.webhook_lambda_zip lambda_timeout = var.webhook_lambda_timeout + lambda_memory_size = var.webhook_lambda_memory_size tracing_config = var.tracing_config logging_retention_in_days = var.logging_retention_in_days logging_kms_key_id = var.logging_kms_key_id diff --git a/modules/runner-binaries-syncer/README.md b/modules/runner-binaries-syncer/README.md index 351809dd54..62dea6297e 100644 --- a/modules/runner-binaries-syncer/README.md +++ b/modules/runner-binaries-syncer/README.md @@ -87,6 +87,7 @@ No modules. | [aws\_partition](#input\_aws\_partition) | (optional) partition for the base arn if not 'aws' | `string` | `"aws"` | no | | [distribution\_bucket\_name](#input\_distribution\_bucket\_name) | Bucket for storing the action runner distribution. | `string` | n/a | yes | | [lambda\_architecture](#input\_lambda\_architecture) | AWS Lambda architecture. Lambda functions using Graviton processors ('arm64') tend to have better price/performance than 'x86\_64' functions. | `string` | `"arm64"` | no | +| [lambda\_memory\_size](#input\_lambda\_memory\_size) | Memory size of the lambda. | `number` | `256` | no | | [lambda\_principals](#input\_lambda\_principals) | (Optional) add extra principals to the role created for execution of the lambda, e.g. for local testing. |
list(object({
type = string
identifiers = list(string)
}))
| `[]` | no | | [lambda\_runtime](#input\_lambda\_runtime) | AWS Lambda runtime. | `string` | `"nodejs18.x"` | no | | [lambda\_s3\_bucket](#input\_lambda\_s3\_bucket) | S3 bucket from which to specify lambda functions. This is an alternative to providing local files directly. | `string` | `null` | no | diff --git a/modules/runner-binaries-syncer/runner-binaries-syncer.tf b/modules/runner-binaries-syncer/runner-binaries-syncer.tf index 6ad8cee56c..2e336b26d5 100644 --- a/modules/runner-binaries-syncer/runner-binaries-syncer.tf +++ b/modules/runner-binaries-syncer/runner-binaries-syncer.tf @@ -18,7 +18,7 @@ resource "aws_lambda_function" "syncer" { handler = "index.handler" runtime = var.lambda_runtime timeout = var.lambda_timeout - memory_size = 256 + memory_size = var.lambda_memory_size architectures = [var.lambda_architecture] environment { diff --git a/modules/runner-binaries-syncer/variables.tf b/modules/runner-binaries-syncer/variables.tf index 8130598438..d55283de0c 100644 --- a/modules/runner-binaries-syncer/variables.tf +++ b/modules/runner-binaries-syncer/variables.tf @@ -74,6 +74,12 @@ variable "lambda_timeout" { default = 300 } +variable "lambda_memory_size" { + description = "Memory size of the lambda." + type = number + default = 256 +} + variable "role_permissions_boundary" { description = "Permissions boundary that will be added to the created role for the lambda." type = string diff --git a/modules/runners/README.md b/modules/runners/README.md index 5665af0cae..e241af9447 100644 --- a/modules/runners/README.md +++ b/modules/runners/README.md @@ -169,6 +169,8 @@ yarn run dist | [lambda\_architecture](#input\_lambda\_architecture) | AWS Lambda architecture. Lambda functions using Graviton processors ('arm64') tend to have better price/performance than 'x86\_64' functions. | `string` | `"arm64"` | no | | [lambda\_runtime](#input\_lambda\_runtime) | AWS Lambda runtime. | `string` | `"nodejs18.x"` | no | | [lambda\_s3\_bucket](#input\_lambda\_s3\_bucket) | S3 bucket from which to specify lambda functions. This is an alternative to providing local files directly. | `string` | `null` | no | +| [lambda\_scale\_down\_memory\_size](#input\_lambda\_scale\_down\_memory\_size) | Memory size limit in MB for scale down lambda. | `number` | `512` | no | +| [lambda\_scale\_up\_memory\_size](#input\_lambda\_scale\_up\_memory\_size) | Memory size limit in MB for scale-up lambda. | `number` | `512` | no | | [lambda\_security\_group\_ids](#input\_lambda\_security\_group\_ids) | List of security group IDs associated with the Lambda function. | `list(string)` | `[]` | no | | [lambda\_subnet\_ids](#input\_lambda\_subnet\_ids) | List of subnets in which the lambda will be launched, the subnets needs to be subnets in the `vpc_id`. | `list(string)` | `[]` | no | | [lambda\_timeout\_scale\_down](#input\_lambda\_timeout\_scale\_down) | Time out for the scale down lambda in seconds. | `number` | `60` | no | @@ -181,6 +183,7 @@ yarn run dist | [minimum\_running\_time\_in\_minutes](#input\_minimum\_running\_time\_in\_minutes) | The time an ec2 action runner should be running at minimum before terminated if non busy. If not set the default is calculated based on the OS. | `number` | `null` | no | | [overrides](#input\_overrides) | This map provides the possibility to override some defaults. The following attributes are supported: `name_sg` overrides the `Name` tag for all security groups created by this module. `name_runner_agent_instance` overrides the `Name` tag for the ec2 instance defined in the auto launch configuration. `name_docker_machine_runners` overrides the `Name` tag spot instances created by the runner agent. | `map(string)` |
{
"name_runner": "",
"name_sg": ""
}
| no | | [pool\_config](#input\_pool\_config) | The configuration for updating the pool. The `pool_size` to adjust to by the events triggered by the `schedule_expression`. For example you can configure a cron expression for week days to adjust the pool to 10 and another expression for the weekend to adjust the pool to 1. |
list(object({
schedule_expression = string
size = number
}))
| `[]` | no | +| [pool\_lambda\_memory\_size](#input\_pool\_lambda\_memory\_size) | Lambda Memory size limit in MB for pool lambda | `number` | `512` | no | | [pool\_lambda\_reserved\_concurrent\_executions](#input\_pool\_lambda\_reserved\_concurrent\_executions) | Amount of reserved concurrent executions for the scale-up lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. | `number` | `1` | no | | [pool\_lambda\_timeout](#input\_pool\_lambda\_timeout) | Time out for the pool lambda in seconds. | `number` | `60` | no | | [pool\_runner\_owner](#input\_pool\_runner\_owner) | The pool will deploy runners to the GitHub org ID, set this value to the org to which you want the runners deployed. Repo level is not supported. | `string` | `null` | no | @@ -206,7 +209,7 @@ yarn run dist | [scale\_down\_schedule\_expression](#input\_scale\_down\_schedule\_expression) | Scheduler expression to check every x for scale down. | `string` | `"cron(*/5 * * * ? *)"` | no | | [scale\_up\_reserved\_concurrent\_executions](#input\_scale\_up\_reserved\_concurrent\_executions) | Amount of reserved concurrent executions for the scale-up lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. | `number` | `1` | no | | [sqs\_build\_queue](#input\_sqs\_build\_queue) | SQS queue to consume accepted build events. |
object({
arn = string
})
| n/a | yes | -| [ssm\_housekeeper](#input\_ssm\_housekeeper) | Configuration for the SSM housekeeper lambda. This lambda deletes token / JIT config from SSM.

`schedule_expression`: is used to configure the schedule for the lambda.
`state`: state of the cloudwatch event rule. Valid values are `DISABLED`, `ENABLED`, and `ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS`.
`lambda_timeout`: timeout for the lambda in seconds.
`config`: configuration for the lambda function. Token path will be read by default from the module. |
object({
schedule_expression = optional(string, "rate(1 day)")
state = optional(string, "ENABLED")
lambda_timeout = optional(number, 60)
config = object({
tokenPath = optional(string)
minimumDaysOld = optional(number, 1)
dryRun = optional(bool, false)
})
})
|
{
"config": {}
}
| no | +| [ssm\_housekeeper](#input\_ssm\_housekeeper) | Configuration for the SSM housekeeper lambda. This lambda deletes token / JIT config from SSM.

`schedule_expression`: is used to configure the schedule for the lambda.
`state`: state of the cloudwatch event rule. Valid values are `DISABLED`, `ENABLED`, and `ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS`.
`lambda_memory_size`: lambda memery size limit.
`lambda_timeout`: timeout for the lambda in seconds.
`config`: configuration for the lambda function. Token path will be read by default from the module. |
object({
schedule_expression = optional(string, "rate(1 day)")
state = optional(string, "ENABLED")
lambda_memory_size = optional(number, 512)
lambda_timeout = optional(number, 60)
config = object({
tokenPath = optional(string)
minimumDaysOld = optional(number, 1)
dryRun = optional(bool, false)
})
})
|
{
"config": {}
}
| no | | [ssm\_paths](#input\_ssm\_paths) | The root path used in SSM to store configuration and secrets. |
object({
root = string
tokens = string
config = string
})
| n/a | yes | | [subnet\_ids](#input\_subnet\_ids) | List of subnets in which the action runners will be launched, the subnets needs to be subnets in the `vpc_id`. | `list(string)` | n/a | yes | | [tags](#input\_tags) | Map of tags that will be added to created resources. By default resources will be tagged with name. | `map(string)` | `{}` | no | diff --git a/modules/runners/pool.tf b/modules/runners/pool.tf index e568f53412..7b1a52e5bb 100644 --- a/modules/runners/pool.tf +++ b/modules/runners/pool.tf @@ -27,6 +27,7 @@ module "pool" { security_group_ids = var.lambda_security_group_ids subnet_ids = var.lambda_subnet_ids architecture = var.lambda_architecture + memory_size = var.pool_lambda_memory_size runtime = var.lambda_runtime timeout = var.pool_lambda_timeout zip = local.lambda_zip diff --git a/modules/runners/pool/README.md b/modules/runners/pool/README.md index 946f73cf25..7b1a275b4f 100644 --- a/modules/runners/pool/README.md +++ b/modules/runners/pool/README.md @@ -46,7 +46,7 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [aws\_partition](#input\_aws\_partition) | (optional) partition for the arn if not 'aws' | `string` | `"aws"` | no | -| [config](#input\_config) | Lookup details in parent module. |
object({
lambda = object({
log_level = string
logging_retention_in_days = number
logging_kms_key_id = string
reserved_concurrent_executions = number
s3_bucket = string
s3_key = string
s3_object_version = string
security_group_ids = list(string)
runtime = string
architecture = string
timeout = number
zip = string
subnet_ids = list(string)
})
tags = map(string)
ghes = object({
url = string
ssl_verify = string
})
github_app_parameters = object({
key_base64 = map(string)
id = map(string)
})
subnet_ids = list(string)
runner = object({
disable_runner_autoupdate = bool
ephemeral = bool
enable_jit_config = bool
enable_on_demand_failover_for_errors = list(string)
boot_time_in_minutes = number
labels = list(string)
launch_template = object({
name = string
})
group_name = string
name_prefix = string
pool_owner = string
role = object({
arn = string
})
})
instance_types = list(string)
instance_target_capacity_type = string
instance_allocation_strategy = string
instance_max_spot_price = string
prefix = string
pool = list(object({
schedule_expression = string
size = number
}))
role_permissions_boundary = string
kms_key_arn = string
ami_kms_key_arn = string
role_path = string
ssm_token_path = string
ssm_config_path = string
ami_id_ssm_parameter_name = string
ami_id_ssm_parameter_read_policy_arn = string
arn_ssm_parameters_path_config = string
})
| n/a | yes | +| [config](#input\_config) | Lookup details in parent module. |
object({
lambda = object({
log_level = string
logging_retention_in_days = number
logging_kms_key_id = string
reserved_concurrent_executions = number
s3_bucket = string
s3_key = string
s3_object_version = string
security_group_ids = list(string)
runtime = string
architecture = string
memory_size = number
timeout = number
zip = string
subnet_ids = list(string)
})
tags = map(string)
ghes = object({
url = string
ssl_verify = string
})
github_app_parameters = object({
key_base64 = map(string)
id = map(string)
})
subnet_ids = list(string)
runner = object({
disable_runner_autoupdate = bool
ephemeral = bool
enable_jit_config = bool
enable_on_demand_failover_for_errors = list(string)
boot_time_in_minutes = number
labels = list(string)
launch_template = object({
name = string
})
group_name = string
name_prefix = string
pool_owner = string
role = object({
arn = string
})
})
instance_types = list(string)
instance_target_capacity_type = string
instance_allocation_strategy = string
instance_max_spot_price = string
prefix = string
pool = list(object({
schedule_expression = string
size = number
}))
role_permissions_boundary = string
kms_key_arn = string
ami_kms_key_arn = string
role_path = string
ssm_token_path = string
ssm_config_path = string
ami_id_ssm_parameter_name = string
ami_id_ssm_parameter_read_policy_arn = string
arn_ssm_parameters_path_config = string
})
| n/a | yes | | [tracing\_config](#input\_tracing\_config) | Configuration for lambda tracing. |
object({
mode = optional(string, null)
capture_http_requests = optional(bool, false)
capture_error = optional(bool, false)
})
| `{}` | no | ## Outputs diff --git a/modules/runners/pool/main.tf b/modules/runners/pool/main.tf index a796983d38..287a02e3d4 100644 --- a/modules/runners/pool/main.tf +++ b/modules/runners/pool/main.tf @@ -12,7 +12,7 @@ resource "aws_lambda_function" "pool" { runtime = var.config.lambda.runtime timeout = var.config.lambda.timeout reserved_concurrent_executions = var.config.lambda.reserved_concurrent_executions - memory_size = 512 + memory_size = var.config.lambda.memory_size tags = var.config.tags environment { diff --git a/modules/runners/pool/variables.tf b/modules/runners/pool/variables.tf index 89c78f3943..83dbf4c5a0 100644 --- a/modules/runners/pool/variables.tf +++ b/modules/runners/pool/variables.tf @@ -12,6 +12,7 @@ variable "config" { security_group_ids = list(string) runtime = string architecture = string + memory_size = number timeout = number zip = string subnet_ids = list(string) diff --git a/modules/runners/scale-down.tf b/modules/runners/scale-down.tf index d211a9ded7..c8dd65129e 100644 --- a/modules/runners/scale-down.tf +++ b/modules/runners/scale-down.tf @@ -17,7 +17,7 @@ resource "aws_lambda_function" "scale_down" { runtime = var.lambda_runtime timeout = var.lambda_timeout_scale_down tags = local.tags - memory_size = 512 + memory_size = var.lambda_scale_down_memory_size architectures = [var.lambda_architecture] environment { diff --git a/modules/runners/scale-up.tf b/modules/runners/scale-up.tf index 7f0270d251..24a6c39248 100644 --- a/modules/runners/scale-up.tf +++ b/modules/runners/scale-up.tf @@ -10,7 +10,7 @@ resource "aws_lambda_function" "scale_up" { runtime = var.lambda_runtime timeout = var.lambda_timeout_scale_up reserved_concurrent_executions = var.scale_up_reserved_concurrent_executions - memory_size = 512 + memory_size = var.lambda_scale_up_memory_size tags = local.tags architectures = [var.lambda_architecture] environment { diff --git a/modules/runners/ssm-housekeeper.tf b/modules/runners/ssm-housekeeper.tf index fe4d7b5ab0..61c6c67c49 100644 --- a/modules/runners/ssm-housekeeper.tf +++ b/modules/runners/ssm-housekeeper.tf @@ -3,6 +3,7 @@ locals { schedule_expression = var.ssm_housekeeper.schedule_expression state = var.ssm_housekeeper.state lambda_timeout = var.ssm_housekeeper.lambda_timeout + lambda_memory_size = var.ssm_housekeeper.lambda_memory_size config = { tokenPath = var.ssm_housekeeper.config.tokenPath == null ? local.token_path : var.ssm_housekeeper.config.tokenPath minimumDaysOld = var.ssm_housekeeper.config.minimumDaysOld @@ -23,7 +24,7 @@ resource "aws_lambda_function" "ssm_housekeeper" { runtime = var.lambda_runtime timeout = local.ssm_housekeeper.lambda_timeout tags = local.tags - memory_size = 512 + memory_size = local.ssm_housekeeper.lambda_memory_size architectures = [var.lambda_architecture] environment { diff --git a/modules/runners/variables.tf b/modules/runners/variables.tf index c67b0aab84..040a601471 100644 --- a/modules/runners/variables.tf +++ b/modules/runners/variables.tf @@ -186,6 +186,12 @@ variable "github_app_parameters" { }) } +variable "lambda_scale_down_memory_size" { + description = "Memory size limit in MB for scale down lambda." + type = number + default = 512 +} + variable "scale_down_schedule_expression" { description = "Scheduler expression to check every x for scale down." type = string @@ -233,6 +239,12 @@ variable "scale_up_reserved_concurrent_executions" { default = 1 } +variable "lambda_scale_up_memory_size" { + description = "Memory size limit in MB for scale-up lambda." + type = number + default = 512 +} + variable "lambda_timeout_scale_up" { description = "Time out for the scale up lambda in seconds." type = number @@ -501,6 +513,12 @@ variable "pool_lambda_timeout" { default = 60 } +variable "pool_lambda_memory_size" { + description = "Lambda Memory size limit in MB for pool lambda" + type = number + default = 512 +} + variable "pool_runner_owner" { description = "The pool will deploy runners to the GitHub org ID, set this value to the org to which you want the runners deployed. Repo level is not supported." type = string @@ -614,12 +632,14 @@ variable "ssm_housekeeper" { `schedule_expression`: is used to configure the schedule for the lambda. `state`: state of the cloudwatch event rule. Valid values are `DISABLED`, `ENABLED`, and `ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS`. + `lambda_memory_size`: lambda memery size limit. `lambda_timeout`: timeout for the lambda in seconds. `config`: configuration for the lambda function. Token path will be read by default from the module. EOF type = object({ schedule_expression = optional(string, "rate(1 day)") state = optional(string, "ENABLED") + lambda_memory_size = optional(number, 512) lambda_timeout = optional(number, 60) config = object({ tokenPath = optional(string) diff --git a/modules/webhook/README.md b/modules/webhook/README.md index 7c4d5bf474..a11af7e94e 100644 --- a/modules/webhook/README.md +++ b/modules/webhook/README.md @@ -82,6 +82,7 @@ No modules. | [github\_app\_parameters](#input\_github\_app\_parameters) | Parameter Store for GitHub App Parameters. |
object({
webhook_secret = map(string)
})
| n/a | yes | | [kms\_key\_arn](#input\_kms\_key\_arn) | Optional CMK Key ARN to be used for Parameter Store. | `string` | `null` | no | | [lambda\_architecture](#input\_lambda\_architecture) | AWS Lambda architecture. Lambda functions using Graviton processors ('arm64') tend to have better price/performance than 'x86\_64' functions. | `string` | `"arm64"` | no | +| [lambda\_memory\_size](#input\_lambda\_memory\_size) | Memory size limit in MB for lambda. | `number` | `256` | no | | [lambda\_runtime](#input\_lambda\_runtime) | AWS Lambda runtime. | `string` | `"nodejs18.x"` | no | | [lambda\_s3\_bucket](#input\_lambda\_s3\_bucket) | S3 bucket from which to specify lambda functions. This is an alternative to providing local files directly. | `string` | `null` | no | | [lambda\_security\_group\_ids](#input\_lambda\_security\_group\_ids) | List of security group IDs associated with the Lambda function. | `list(string)` | `[]` | no | diff --git a/modules/webhook/variables.tf b/modules/webhook/variables.tf index 1ccabd188b..95ef7627ed 100644 --- a/modules/webhook/variables.tf +++ b/modules/webhook/variables.tf @@ -54,6 +54,12 @@ variable "lambda_zip" { default = null } +variable "lambda_memory_size" { + description = "Memory size limit in MB for lambda." + type = number + default = 256 +} + variable "lambda_timeout" { description = "Time out of the lambda in seconds." type = number diff --git a/modules/webhook/webhook.tf b/modules/webhook/webhook.tf index 6b9ba75d1e..6b90839054 100644 --- a/modules/webhook/webhook.tf +++ b/modules/webhook/webhook.tf @@ -17,6 +17,7 @@ resource "aws_lambda_function" "webhook" { role = aws_iam_role.webhook_lambda.arn handler = "index.githubWebhook" runtime = var.lambda_runtime + memory_size = var.lambda_memory_size timeout = var.lambda_timeout architectures = [var.lambda_architecture] diff --git a/variables.tf b/variables.tf index 27f250cc0a..f11b6368f3 100644 --- a/variables.tf +++ b/variables.tf @@ -82,6 +82,12 @@ variable "webhook_lambda_zip" { default = null } +variable "webhook_lambda_memory_size" { + description = "Memory size limit in MB for webhook lambda in." + type = number + default = 256 +} + variable "webhook_lambda_timeout" { description = "Time out of the webhook lambda in seconds." type = number @@ -94,12 +100,24 @@ variable "runners_lambda_zip" { default = null } +variable "runners_scale_up_Lambda_memory_size" { + description = "Memory size limit in MB for scale-up lambda." + type = number + default = 512 +} + variable "runners_scale_up_lambda_timeout" { description = "Time out for the scale up lambda in seconds." type = number default = 30 } +variable "runners_scale_down_lambda_memory_size" { + description = "Memory size limit in MB for scale-down lambda." + type = number + default = 512 +} + variable "runners_scale_down_lambda_timeout" { description = "Time out for the scale down lambda in seconds." type = number @@ -112,6 +130,12 @@ variable "runner_binaries_syncer_lambda_zip" { default = null } +variable "runner_binaries_syncer_lambda_memory_size" { + description = "Memory size limit in MB for binary syncer lambda." + type = number + default = 256 +} + variable "runner_binaries_syncer_lambda_timeout" { description = "Time out of the binaries sync lambda in seconds." type = number @@ -622,6 +646,12 @@ variable "runner_architecture" { } } +variable "pool_lambda_memory_size" { + description = "Memory size limit for scale-up lambda." + type = number + default = 512 +} + variable "pool_lambda_timeout" { description = "Time out for the pool lambda in seconds." type = number @@ -798,12 +828,14 @@ variable "runners_ssm_housekeeper" { `schedule_expression`: is used to configure the schedule for the lambda. `enabled`: enable or disable the lambda trigger via the EventBridge. + `lambda_memory_size`: lambda memery size limit. `lambda_timeout`: timeout for the lambda in seconds. `config`: configuration for the lambda function. Token path will be read by default from the module. EOF type = object({ schedule_expression = optional(string, "rate(1 day)") enabled = optional(bool, true) + lambda_memory_size = optional(number, 512) lambda_timeout = optional(number, 60) config = object({ tokenPath = optional(string)