Skip to content

Commit 3502e45

Browse files
SanB16antonbabenko
andauthored
feat: Allow changing runtime variable (#252)
Co-authored-by: Anton Babenko <anton@antonbabenko.com>
1 parent 0a6a45e commit 3502e45

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.96.1
3+
rev: v1.99.4
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_docs

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ See the [functions](https://github.com/terraform-aws-modules/terraform-aws-notif
126126
| <a name="input_putin_khuylo"></a> [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 |
127127
| <a name="input_recreate_missing_package"></a> [recreate\_missing\_package](#input\_recreate\_missing\_package) | Whether to recreate missing Lambda package if it is missing locally or not | `bool` | `true` | no |
128128
| <a name="input_reserved_concurrent_executions"></a> [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 |
129+
| <a name="input_runtime"></a> [runtime](#input\_runtime) | Lambda Function runtime | `string` | `"python3.11"` | no |
129130
| <a name="input_slack_channel"></a> [slack\_channel](#input\_slack\_channel) | The name of the channel in Slack for notifications | `string` | n/a | yes |
130131
| <a name="input_slack_emoji"></a> [slack\_emoji](#input\_slack\_emoji) | A custom emoji that will appear on Slack messages | `string` | `":aws:"` | no |
131132
| <a name="input_slack_username"></a> [slack\_username](#input\_slack\_username) | The username that will appear on Slack messages | `string` | n/a | yes |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ module "lambda" {
9999
handler = "${local.lambda_handler}.lambda_handler"
100100
source_path = var.lambda_source_path != null ? "${path.root}/${var.lambda_source_path}" : "${path.module}/functions/notify_slack.py"
101101
recreate_missing_package = var.recreate_missing_package
102-
runtime = "python3.11"
102+
runtime = var.runtime
103103
architectures = var.architectures
104104
timeout = 30
105105
kms_key_arn = var.kms_key_arn

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,3 +287,9 @@ variable "trigger_on_package_timestamp" {
287287
type = bool
288288
default = false
289289
}
290+
291+
variable "runtime" {
292+
description = "Lambda Function runtime"
293+
type = string
294+
default = "python3.11"
295+
}

0 commit comments

Comments
 (0)