Skip to content

Commit 366edcd

Browse files
authored
Merge branch 'master' into feat/add-uv-support
2 parents 04932fd + f71e78a commit 366edcd

File tree

5 files changed

+30
-5
lines changed

5 files changed

+30
-5
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [8.3.0](https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v8.2.1...v8.3.0) (2026-01-25)
6+
7+
### Features
8+
9+
* Add support for tenant isolation mode feature ([#718](https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/718)) ([ab332c1](https://github.com/terraform-aws-modules/terraform-aws-lambda/commit/ab332c1e75f956144bce193966eb2b194d3194a3))
10+
11+
## [8.2.1](https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v8.2.0...v8.2.1) (2026-01-25)
12+
13+
### Bug Fixes
14+
15+
* Avoids issue due to strict requirement for fileexists to return consistent results ([#722](https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/722)) ([d6b4321](https://github.com/terraform-aws-modules/terraform-aws-lambda/commit/d6b4321d9633b0f5b02c6b9162a453816dd559c5))
16+
517
## [8.2.0](https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v8.1.2...v8.2.0) (2026-01-08)
618

719
### Features

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,7 @@ No modules.
858858
| <a name="input_source_path"></a> [source\_path](#input\_source\_path) | The absolute path to a local file or directory containing your Lambda source code | `any` | `null` | no |
859859
| <a name="input_store_on_s3"></a> [store\_on\_s3](#input\_store\_on\_s3) | Whether to store produced artifacts on S3 or locally. | `bool` | `false` | no |
860860
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to assign to resources. | `map(string)` | `{}` | no |
861+
| <a name="input_tenant_isolation_mode"></a> [tenant\_isolation\_mode](#input\_tenant\_isolation\_mode) | Enable tenant isolation mode for the Lambda Function | `bool` | `false` | no |
861862
| <a name="input_timeout"></a> [timeout](#input\_timeout) | The amount of time your Lambda Function has to run in seconds. | `number` | `3` | no |
862863
| <a name="input_timeouts"></a> [timeouts](#input\_timeouts) | Define maximum timeout for creating, updating, and deleting Lambda Function resources | `map(string)` | `{}` | no |
863864
| <a name="input_tracing_mode"></a> [tracing\_mode](#input\_tracing\_mode) | Tracing mode of the Lambda Function. Valid value can be either PassThrough or Active. | `string` | `null` | no |

main.tf

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ locals {
77

88
archive_filename = try(data.external.archive_prepare[0].result.filename, null)
99
archive_filename_string = local.archive_filename != null ? local.archive_filename : ""
10-
archive_was_missing = try(data.external.archive_prepare[0].result.was_missing, false)
1110

1211
# Use a generated filename to determine when the source code has changed.
1312
# filename - to get package from local
14-
filename = var.local_existing_package != null ? var.local_existing_package : (var.store_on_s3 ? null : local.archive_filename)
15-
was_missing = var.local_existing_package != null ? !fileexists(var.local_existing_package) : local.archive_was_missing
13+
filename = var.local_existing_package != null ? var.local_existing_package : (var.store_on_s3 ? null : local.archive_filename)
1614

1715
# s3_* - to get package from S3
1816
s3_bucket = var.s3_existing_package != null ? try(var.s3_existing_package.bucket, null) : (var.store_on_s3 ? var.s3_bucket : null)
@@ -55,7 +53,7 @@ resource "aws_lambda_function" "this" {
5553
}
5654

5755
filename = local.filename
58-
source_code_hash = var.ignore_source_code_hash ? null : (local.filename == null ? false : fileexists(local.filename)) && !local.was_missing ? filebase64sha256(local.filename) : null
56+
source_code_hash = var.ignore_source_code_hash ? null : (local.filename == null ? false : fileexists(local.filename)) ? filebase64sha256(local.filename) : null
5957

6058
s3_bucket = local.s3_bucket
6159
s3_key = local.s3_key
@@ -139,6 +137,13 @@ resource "aws_lambda_function" "this" {
139137
}
140138
}
141139

140+
dynamic "tenancy_config" {
141+
for_each = var.tenant_isolation_mode ? [true] : []
142+
content {
143+
tenant_isolation_mode = "PER_TENANT"
144+
}
145+
}
146+
142147
tags = merge(
143148
var.tags,
144149
var.function_tags
@@ -182,7 +187,7 @@ resource "aws_lambda_layer_version" "this" {
182187
skip_destroy = var.layer_skip_destroy
183188

184189
filename = local.filename
185-
source_code_hash = var.ignore_source_code_hash ? null : (local.filename == null ? false : fileexists(local.filename)) && !local.was_missing ? filebase64sha256(local.filename) : null
190+
source_code_hash = var.ignore_source_code_hash ? null : (local.filename == null ? false : fileexists(local.filename)) ? filebase64sha256(local.filename) : null
186191

187192
s3_bucket = local.s3_bucket
188193
s3_key = local.s3_key

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ variable "skip_destroy" {
280280
default = null
281281
}
282282

283+
variable "tenant_isolation_mode" {
284+
description = "Enable tenant isolation mode for the Lambda Function"
285+
type = bool
286+
default = false
287+
}
288+
283289
###############
284290
# Function URL
285291
###############

wrappers/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ module "wrapper" {
128128
source_path = try(each.value.source_path, var.defaults.source_path, null)
129129
store_on_s3 = try(each.value.store_on_s3, var.defaults.store_on_s3, false)
130130
tags = try(each.value.tags, var.defaults.tags, {})
131+
tenant_isolation_mode = try(each.value.tenant_isolation_mode, var.defaults.tenant_isolation_mode, false)
131132
timeout = try(each.value.timeout, var.defaults.timeout, 3)
132133
timeouts = try(each.value.timeouts, var.defaults.timeouts, {})
133134
tracing_mode = try(each.value.tracing_mode, var.defaults.tracing_mode, null)

0 commit comments

Comments
 (0)