Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,8 @@ No modules.
| <a name="input_docker_image"></a> [docker\_image](#input\_docker\_image) | Docker image to use for the build | `string` | `""` | no |
| <a name="input_docker_pip_cache"></a> [docker\_pip\_cache](#input\_docker\_pip\_cache) | Whether to mount a shared pip cache folder into docker environment or not | `any` | `null` | no |
| <a name="input_docker_with_ssh_agent"></a> [docker\_with\_ssh\_agent](#input\_docker\_with\_ssh\_agent) | Whether to pass SSH\_AUTH\_SOCK into docker environment or not | `bool` | `false` | no |
| <a name="input_durable_config_execution_timeout"></a> [durable\_config\_execution\_timeout](#input\_durable\_config\_execution\_timeout) | Maximum execution time in seconds for the durable function. Valid values between 1 and 31622400 (366 days). | `number` | `null` | no |
| <a name="input_durable_config_retention_period"></a> [durable\_config\_retention\_period](#input\_durable\_config\_retention\_period) | Number of days to retain the function's execution state. Valid values between 1 and 90. Defaults to 14 if durable\_config is enabled. | `number` | `null` | no |
| <a name="input_environment_variables"></a> [environment\_variables](#input\_environment\_variables) | A map that defines environment variables for the Lambda Function. | `map(string)` | `{}` | no |
| <a name="input_ephemeral_storage_size"></a> [ephemeral\_storage\_size](#input\_ephemeral\_storage\_size) | Amount of ephemeral storage (/tmp) in MB your Lambda Function can use at runtime. Valid value between 512 MB to 10,240 MB (10 GB). | `number` | `512` | no |
| <a name="input_event_source_mapping"></a> [event\_source\_mapping](#input\_event\_source\_mapping) | Map of event source mapping | `any` | `{}` | no |
Expand Down
9 changes: 9 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,15 @@ resource "aws_lambda_function" "this" {
}
}

dynamic "durable_config" {
for_each = var.durable_config_execution_timeout != null ? [true] : []

content {
execution_timeout = var.durable_config_execution_timeout
retention_period = var.durable_config_retention_period
}
}

dynamic "timeouts" {
for_each = length(var.timeouts) > 0 ? [true] : []

Expand Down
16 changes: 16 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -861,3 +861,19 @@ variable "recursive_loop" {
type = string
default = null
}

############################################
# Lambda Durable Execution Settings
############################################

variable "durable_config_execution_timeout" {
description = "Maximum execution time in seconds for the durable function. Valid values between 1 and 31622400 (366 days)."
type = number
default = null
}

variable "durable_config_retention_period" {
description = "Number of days to retain the function's execution state. Valid values between 1 and 90. Defaults to 14 if durable_config is enabled."
type = number
default = null
}
2 changes: 2 additions & 0 deletions wrappers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ module "wrapper" {
docker_image = try(each.value.docker_image, var.defaults.docker_image, "")
docker_pip_cache = try(each.value.docker_pip_cache, var.defaults.docker_pip_cache, null)
docker_with_ssh_agent = try(each.value.docker_with_ssh_agent, var.defaults.docker_with_ssh_agent, false)
durable_config_execution_timeout = try(each.value.durable_config_execution_timeout, var.defaults.durable_config_execution_timeout, null)
durable_config_retention_period = try(each.value.durable_config_retention_period, var.defaults.durable_config_retention_period, null)
environment_variables = try(each.value.environment_variables, var.defaults.environment_variables, {})
ephemeral_storage_size = try(each.value.ephemeral_storage_size, var.defaults.ephemeral_storage_size, 512)
event_source_mapping = try(each.value.event_source_mapping, var.defaults.event_source_mapping, {})
Expand Down