Skip to content

Commit 04f28d9

Browse files
committed
add support for tenant isolation mode feature
1 parent a7db125 commit 04f28d9

File tree

6 files changed

+19
-4
lines changed

6 files changed

+19
-4
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ Q4: What does this error mean - `"We currently do not support adding policies fo
667667
| Name | Version |
668668
|------|---------|
669669
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
670-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
670+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.23.0 |
671671
| <a name="requirement_external"></a> [external](#requirement\_external) | >= 1.0 |
672672
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 1.0 |
673673
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
@@ -676,7 +676,7 @@ Q4: What does this error mean - `"We currently do not support adding policies fo
676676

677677
| Name | Version |
678678
|------|---------|
679-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
679+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.23.0 |
680680
| <a name="provider_external"></a> [external](#provider\_external) | >= 1.0 |
681681
| <a name="provider_local"></a> [local](#provider\_local) | >= 1.0 |
682682
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |
@@ -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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,13 @@ resource "aws_lambda_function" "this" {
139139
}
140140
}
141141

142+
dynamic "tenancy_config" {
143+
for_each = var.tenant_isolation_mode ? [true] : []
144+
content {
145+
tenant_isolation_mode = "PER_TENANT"
146+
}
147+
}
148+
142149
tags = merge(
143150
var.include_default_tag ? { terraform-aws-modules = "lambda" } : {},
144151
var.tags,

variables.tf

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

281+
variable "tenant_isolation_mode" {
282+
description = "Enable tenant isolation mode for the Lambda Function"
283+
type = bool
284+
default = false
285+
}
286+
281287
###############
282288
# Function URL
283289
###############

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.0"
7+
version = ">= 6.23.0"
88
}
99
external = {
1010
source = "hashicorp/external"

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)

wrappers/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.0"
7+
version = ">= 6.23.0"
88
}
99
external = {
1010
source = "hashicorp/external"

0 commit comments

Comments
 (0)