Skip to content

fix:enabling python version as input #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module "lambda-put-nodes-to-standby" {
function_name = "${var.name}-put-nodes-to-standby"
description = "A lambda function to put an instance to standby"
handler = "putNodesToStandby.lambda_handler"
runtime = "python3.8"
runtime = var.runtime_python
timeout = 900
create_role = false
source_path = "${path.module}/lambdas/putNodesToStandby.py"
Expand All @@ -31,7 +31,7 @@ module "lambda-check-for-pods" {
function_name = "${var.name}-check-for-running-pods"
description = "A lambda function to check for running pods in an instance"
handler = "checkNodesForRunningPods.handler"
runtime = "python3.8"
runtime = var.runtime_python
timeout = 60

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

source_path = [
Expand Down Expand Up @@ -93,7 +93,7 @@ module "lambda-detach-and-terminate-node" {
function_name = "${var.name}-detachand-terminate-node"
description = "A lambda function to detach a node from asg and terminate it"
handler = "detachAndTerminateNode.lambda_handler"
runtime = "python3.8"
runtime = var.runtime_python
timeout = 60
source_path = "${path.module}/lambdas/detachAndTerminateNode.py"
tags = var.tags
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ variable "namespace" {
type = string
default = "default"
}

variable "runtime_python" {
description = "The runtime version for python env"
type = string
default = "python3.8"
}