diff --git a/terraform/module/json_files/state_machine.json b/terraform/module/json_files/state_machine.json index bcb6bd8..3d91928 100644 --- a/terraform/module/json_files/state_machine.json +++ b/terraform/module/json_files/state_machine.json @@ -61,7 +61,7 @@ "Type": "Task", "Resource": "${executorArn}", "End": true, - "TimeoutSeconds": 30, + "TimeoutSeconds": ${totalExecutionTimeout}, "Retry": [{ "ErrorEquals": ["States.ALL"], "IntervalSeconds": 3, diff --git a/terraform/module/lambda.tf b/terraform/module/lambda.tf index 7db7f54..77414fc 100644 --- a/terraform/module/lambda.tf +++ b/terraform/module/lambda.tf @@ -80,7 +80,7 @@ resource "aws_lambda_function" "executor" { handler = "executor.handler" layers = [aws_lambda_layer_version.lambda_layer.arn] memory_size = 128 - timeout = 30 + timeout = var.total_execution_timeout # The filebase64sha256() function is available in Terraform 0.11.12 and later # For Terraform 0.11.11 and earlier, use the base64sha256() function and the file() function: diff --git a/terraform/module/locals.tf b/terraform/module/locals.tf index 0d592f1..72240c0 100644 --- a/terraform/module/locals.tf +++ b/terraform/module/locals.tf @@ -13,6 +13,7 @@ locals { initializerArn = aws_lambda_function.initializer.arn, publisherArn = aws_lambda_function.publisher.arn, executorArn = aws_lambda_function.executor.arn, + totalExecutionTimeout = var.total_execution_timeout cleanerArn = aws_lambda_function.cleaner.arn, analyzerArn = aws_lambda_function.analyzer.arn, optimizerArn = aws_lambda_function.optimizer.arn diff --git a/terraform/module/variables.tf b/terraform/module/variables.tf index b4b6e95..68e0260 100644 --- a/terraform/module/variables.tf +++ b/terraform/module/variables.tf @@ -7,6 +7,13 @@ variable "lambda_function_prefix" { description = "Prefix used for the names of Lambda functions, Step Functions state machines, IAM roles, and IAM policies." } +variable "executor_function_timeout" { + default = 30 + type = number + description = "Timeout for the executor function" +} + + variable "role_path_override" { default = "" type = string