From 2173322ea9896399238337e8121d472168bd1122 Mon Sep 17 00:00:00 2001 From: Sandalee Bandara Date: Tue, 17 Jun 2025 09:31:58 +1200 Subject: [PATCH 1/2] chore(runtime): remove hardcoded value for runtime --- main.tf | 2 +- variables.tf | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 45f09a96..7a8e5292 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 75813fc0..e01be73c 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" +} From 19de18262d87f53ca9a838997b9e9536ff90d8fd Mon Sep 17 00:00:00 2001 From: Anton Babenko Date: Mon, 23 Jun 2025 15:26:10 +0200 Subject: [PATCH 2/2] Fixed docs --- .pre-commit-config.yaml | 2 +- README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a6cd3694..776bc243 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 87fd994e..1f830c96 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 |