From 26ebeacfd36f7c88d8103ef811853fbe370337dc Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:20:35 -0700 Subject: [PATCH] add variable "lambda_runtime" to add support for provided.al2 --- terraform/041-id-broker-search-lambda/README.md | 1 + terraform/041-id-broker-search-lambda/main.tf | 2 +- terraform/041-id-broker-search-lambda/vars.tf | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/terraform/041-id-broker-search-lambda/README.md b/terraform/041-id-broker-search-lambda/README.md index d61d4c7c..73a3e6f9 100644 --- a/terraform/041-id-broker-search-lambda/README.md +++ b/terraform/041-id-broker-search-lambda/README.md @@ -20,6 +20,7 @@ This module is used to create a lambda function for calling id-broker's search a - `app_name` - Default: `idp-id-broker-search` - `function_name` - Default: `idp-id-broker-search` + - `lambda_runtime` - AWS Lambda runtime environment, either `provided.al2` or `go1.x`. `go1.x` is deprecated but remains the default for backward compatibility - `memory_size` - Default: `128` - `timeout` - Default: `5` - `function_zip_name` - Key to file in S3 for function zip file, Default: `idp-id-broker-search.zip` diff --git a/terraform/041-id-broker-search-lambda/main.tf b/terraform/041-id-broker-search-lambda/main.tf index 022230ef..ec6ac0ed 100644 --- a/terraform/041-id-broker-search-lambda/main.tf +++ b/terraform/041-id-broker-search-lambda/main.tf @@ -34,7 +34,7 @@ resource "aws_lambda_function" "search" { handler = var.function_name memory_size = var.memory_size role = aws_iam_role.functionRole.arn - runtime = "go1.x" + runtime = var.lambda_runtime timeout = var.timeout environment { diff --git a/terraform/041-id-broker-search-lambda/vars.tf b/terraform/041-id-broker-search-lambda/vars.tf index da2de429..7cf8bff1 100644 --- a/terraform/041-id-broker-search-lambda/vars.tf +++ b/terraform/041-id-broker-search-lambda/vars.tf @@ -30,6 +30,12 @@ variable "idp_name" { type = string } +variable "lambda_runtime" { + description = "AWS Lambda runtime environment, either `provided.al2` or `go1.x`. `go1.x` is deprecated" + default = "go1.x" + type = string +} + variable "memory_size" { default = "128" }