Skip to content

Commit ca6938f

Browse files
chore: add support for node 24 (#63)
* add support for node 24 * bump default node layer version --------- Co-authored-by: Alex Angelillo <alex.angelillo@datadoghq.com>
1 parent f8c593f commit ca6938f

File tree

6 files changed

+38
-3
lines changed

6 files changed

+38
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module "lambda-datadog" {
4848
function_name = "example-function"
4949
role = aws_iam_role.lambda_role.arn
5050
handler = "index.lambda_handler"
51-
runtime = "nodejs22.x"
51+
runtime = "nodejs24.x"
5252
memory_size = 256
5353
5454
environment_variables = {

examples/node/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module "lambda-datadog" {
5555
function_name = "terraform-example-node-${var.datadog_service_name}-function"
5656
role = aws_iam_role.lambda_role.arn
5757
handler = "index.lambda_handler"
58-
runtime = "nodejs22.x"
58+
runtime = "nodejs24.x"
5959
memory_size = 256
6060

6161
environment_variables = {

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ locals {
4444
"nodejs18.x" = "Datadog-Node18-x"
4545
"nodejs20.x" = "Datadog-Node20-x"
4646
"nodejs22.x" = "Datadog-Node22-x"
47+
"nodejs24.x" = "Datadog-Node24-x"
4748
"python3.8" = "Datadog-Python38"
4849
"python3.9" = "Datadog-Python39"
4950
"python3.10" = "Datadog-Python310"
@@ -108,6 +109,7 @@ check "runtime_support" {
108109
"nodejs18.x",
109110
"nodejs20.x",
110111
"nodejs22.x",
112+
"nodejs24.x",
111113
"python3.8",
112114
"python3.9",
113115
"python3.10",

smoke_tests/main.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,25 @@ module "lambda-python-3-8" {
174174
}
175175
}
176176

177+
module "lambda-node-24" {
178+
source = "../"
179+
180+
filename = "${path.module}/build/hello-node.zip"
181+
function_name = "terraform-smoketest-node-24-${var.datadog_service_name}-function"
182+
role = aws_iam_role.lambda_role.arn
183+
handler = "index.lambda_handler"
184+
runtime = "nodejs24.x"
185+
memory_size = 256
186+
187+
environment_variables = {
188+
"DD_API_KEY_SECRET_ARN" : var.datadog_secret_arn
189+
"DD_ENV" : "dev"
190+
"DD_SERVICE" : var.datadog_service_name
191+
"DD_SITE" : var.datadog_site
192+
"DD_VERSION" : "1.0.0"
193+
}
194+
}
195+
177196
module "lambda-node-22" {
178197
source = "../"
179198

smoke_tests/outputs.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,20 @@ output "python_3_8_function_name" {
9393
value = module.lambda-python-3-8.function_name
9494
}
9595

96+
output "node_24_arn" {
97+
description = "Amazon Resource Name (ARN) identifying your Lambda Function."
98+
value = module.lambda-node-24.arn
99+
}
100+
101+
output "node_24_invoke_arn" {
102+
description = "ARN to be used for invoking Lambda Function from API Gateway."
103+
value = module.lambda-node-24.invoke_arn
104+
}
105+
106+
output "node_24_function_name" {
107+
description = "Unique name for your Lambda Function"
108+
value = module.lambda-node-24.function_name
109+
}
96110

97111
output "node_22_arn" {
98112
description = "Amazon Resource Name (ARN) identifying your Lambda Function."

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ variable "datadog_java_layer_version" {
2323
variable "datadog_node_layer_version" {
2424
description = "Version for the Datadog Node Layer"
2525
type = number
26-
default = 130
26+
default = 131
2727
}
2828

2929
variable "datadog_python_layer_version" {

0 commit comments

Comments
 (0)