Skip to content

Commit fc53a3e

Browse files
fix:enabling python version as input
1 parent ca034d3 commit fc53a3e

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module "lambda-put-nodes-to-standby" {
99
function_name = "${var.name}-put-nodes-to-standby"
1010
description = "A lambda function to put an instance to standby"
1111
handler = "putNodesToStandby.lambda_handler"
12-
runtime = "python3.8"
12+
runtime = var.runtime_python
1313
timeout = 900
1414
create_role = false
1515
source_path = "${path.module}/lambdas/putNodesToStandby.py"
@@ -31,7 +31,7 @@ module "lambda-check-for-pods" {
3131
function_name = "${var.name}-check-for-running-pods"
3232
description = "A lambda function to check for running pods in an instance"
3333
handler = "checkNodesForRunningPods.handler"
34-
runtime = "python3.8"
34+
runtime = var.runtime_python
3535
timeout = 60
3636

3737
source_path = [
@@ -62,7 +62,7 @@ module "lambda-taint-nodes" {
6262
function_name = "${var.name}-taint-nodes"
6363
description = "A lambda function to ensure no more scheduling on that node"
6464
handler = "taintNodes.handler"
65-
runtime = "python3.8"
65+
runtime = var.runtime_python
6666
timeout = 60
6767

6868
source_path = [
@@ -93,7 +93,7 @@ module "lambda-detach-and-terminate-node" {
9393
function_name = "${var.name}-detachand-terminate-node"
9494
description = "A lambda function to detach a node from asg and terminate it"
9595
handler = "detachAndTerminateNode.lambda_handler"
96-
runtime = "python3.8"
96+
runtime = var.runtime_python
9797
timeout = 60
9898
source_path = "${path.module}/lambdas/detachAndTerminateNode.py"
9999
tags = var.tags

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,9 @@ variable "namespace" {
3030
type = string
3131
default = "default"
3232
}
33+
34+
variable "runtime_python" {
35+
description = "The runtime version for python env"
36+
type = string
37+
default = "python3.8"
38+
}

0 commit comments

Comments
 (0)