Skip to content

Commit 17f310d

Browse files
chore: Python 3.13 runtime support (#26)
1 parent 2081706 commit 17f310d

File tree

6 files changed

+43
-5
lines changed

6 files changed

+43
-5
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module "lambda-datadog" {
2222
function_name = "example-function"
2323
role = aws_iam_role.lambda_role.arn
2424
handler = "app.lambda_handler"
25-
runtime = "python3.11"
25+
runtime = "python3.13"
2626
memory_size = 256
2727
2828
environment_variables = {
@@ -34,7 +34,7 @@ module "lambda-datadog" {
3434
}
3535
3636
datadog_extension_layer_version = 67
37-
datadog_python_layer_version = 104
37+
datadog_python_layer_version = 106
3838
}
3939
```
4040

@@ -229,7 +229,7 @@ No modules.
229229
| <a name="input_datadog_dotnet_layer_version"></a> [datadog\_dotnet\_layer\_version](#input\_datadog\_dotnet\_layer\_version) | Version for the Datadog .NET Layer | `number` | `16` | no |
230230
| <a name="input_datadog_java_layer_version"></a> [datadog\_java\_layer\_version](#input\_datadog\_java\_layer\_version) | Version for the Datadog Java Layer | `number` | `15` | no |
231231
| <a name="input_datadog_node_layer_version"></a> [datadog\_node\_layer\_version](#input\_datadog\_node\_layer\_version) | Version for the Datadog Node Layer | `number` | `117` | no |
232-
| <a name="input_datadog_python_layer_version"></a> [datadog\_python\_layer\_version](#input\_datadog\_python\_layer\_version) | Version for the Datadog Python Layer | `number` | `104` | no |
232+
| <a name="input_datadog_python_layer_version"></a> [datadog\_python\_layer\_version](#input\_datadog\_python\_layer\_version) | Version for the Datadog Python Layer | `number` | `106` | no |
233233
| <a name="input_dead_letter_config_target_arn"></a> [dead\_letter\_config\_target\_arn](#input\_dead\_letter\_config\_target\_arn) | ARN of an SNS topic or SQS queue to notify when an invocation fails. | `string` | `null` | no |
234234
| <a name="input_description"></a> [description](#input\_description) | Description of what your Lambda Function does. | `string` | `null` | no |
235235
| <a name="input_environment_variables"></a> [environment\_variables](#input\_environment\_variables) | Map of environment variables that are accessible from the function code during execution. | `map(string)` | `{}` | no |

examples/python/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module "lambda-datadog" {
5555
function_name = "terraform-example-python-${var.datadog_service_name}-function"
5656
role = aws_iam_role.lambda_role.arn
5757
handler = "app.lambda_handler"
58-
runtime = "python3.11"
58+
runtime = "python3.13"
5959
architectures = ["arm64"]
6060
memory_size = 256
6161

main.tf

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ locals {
5050
"python3.10" = "Datadog-Python310"
5151
"python3.11" = "Datadog-Python311"
5252
"python3.12" = "Datadog-Python312"
53+
"python3.13" = "Datadog-Python313"
5354
}
5455
}
5556

@@ -111,6 +112,7 @@ check "runtime_support" {
111112
"python3.10",
112113
"python3.11",
113114
"python3.12",
115+
"python3.13",
114116
],
115117
var.runtime)
116118
error_message = "${var.runtime} Lambda runtime is not supported by the lambda-datadog Terraform module"

smoke_tests/main.tf

+20
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,26 @@ data "archive_file" "zip_node_code" {
5454
output_path = "${path.module}/build/hello-node.zip"
5555
}
5656

57+
module "lambda-python-3-13" {
58+
source = "../"
59+
60+
filename = "${path.module}/build/hello-python.zip"
61+
function_name = "terraform-smoketest-python-3-13-${var.datadog_service_name}-function"
62+
role = aws_iam_role.lambda_role.arn
63+
handler = "app.lambda_handler"
64+
runtime = "python3.13"
65+
architectures = ["arm64"]
66+
memory_size = 256
67+
68+
environment_variables = {
69+
"DD_API_KEY_SECRET_ARN" : var.datadog_secret_arn
70+
"DD_ENV" : "dev"
71+
"DD_SERVICE" : var.datadog_service_name
72+
"DD_SITE": var.datadog_site
73+
"DD_VERSION" : "1.0.0"
74+
}
75+
}
76+
5777
module "lambda-python-3-12" {
5878
source = "../"
5979

smoke_tests/outputs.tf

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
output "python_3_13_arn" {
2+
description = "Amazon Resource Name (ARN) identifying your Lambda Function."
3+
value = module.lambda-python-3-13.arn
4+
}
5+
6+
output "python_3_13_invoke_arn" {
7+
description = "ARN to be used for invoking Lambda Function from API Gateway."
8+
value = module.lambda-python-3-13.invoke_arn
9+
}
10+
11+
output "python_3_13_function_name" {
12+
description = "Unique name for your Lambda Function"
13+
value = module.lambda-python-3-13.function_name
14+
}
15+
16+
117
output "python_3_12_arn" {
218
description = "Amazon Resource Name (ARN) identifying your Lambda Function."
319
value = module.lambda-python-3-12.arn

variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ variable "datadog_node_layer_version" {
2929
variable "datadog_python_layer_version" {
3030
description = "Version for the Datadog Python Layer"
3131
type = number
32-
default = 104
32+
default = 106
3333
}
3434

3535

0 commit comments

Comments
 (0)