diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a6cd369..776bc24 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.96.1 + rev: v1.99.4 hooks: - id: terraform_fmt - id: terraform_docs diff --git a/README.md b/README.md index 87fd994..1f830c9 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,7 @@ See the [functions](https://github.com/terraform-aws-modules/terraform-aws-notif | [putin\_khuylo](#input\_putin\_khuylo) | Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo! | `bool` | `true` | no | | [recreate\_missing\_package](#input\_recreate\_missing\_package) | Whether to recreate missing Lambda package if it is missing locally or not | `bool` | `true` | no | | [reserved\_concurrent\_executions](#input\_reserved\_concurrent\_executions) | The amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations | `number` | `-1` | no | +| [runtime](#input\_runtime) | Lambda Function runtime | `string` | `"python3.11"` | no | | [slack\_channel](#input\_slack\_channel) | The name of the channel in Slack for notifications | `string` | n/a | yes | | [slack\_emoji](#input\_slack\_emoji) | A custom emoji that will appear on Slack messages | `string` | `":aws:"` | no | | [slack\_username](#input\_slack\_username) | The username that will appear on Slack messages | `string` | n/a | yes | diff --git a/main.tf b/main.tf index 45f09a9..7a8e529 100644 --- a/main.tf +++ b/main.tf @@ -99,7 +99,7 @@ module "lambda" { handler = "${local.lambda_handler}.lambda_handler" source_path = var.lambda_source_path != null ? "${path.root}/${var.lambda_source_path}" : "${path.module}/functions/notify_slack.py" recreate_missing_package = var.recreate_missing_package - runtime = "python3.11" + runtime = var.runtime architectures = var.architectures timeout = 30 kms_key_arn = var.kms_key_arn diff --git a/variables.tf b/variables.tf index 75813fc..e01be73 100644 --- a/variables.tf +++ b/variables.tf @@ -287,3 +287,9 @@ variable "trigger_on_package_timestamp" { type = bool default = false } + +variable "runtime" { + description = "Lambda Function runtime" + type = string + default = "python3.11" +}