Skip to content

Commit 5c82fad

Browse files
Merge pull request #11 from screeningeagledreamlab/master
Add support for EFS file system config
2 parents 3a16b34 + 66791d8 commit 5c82fad

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ module lambda {
9191
| tags | A mapping of tags to assign to the object. | `map` | `{}` | no |
9292
| tracing\_config | Use AWS X-Ray to collect data about events that your function processes, and to identify the cause of errors in your serverless applications. Can be either PassThrough or Active. | <pre>object({<br> mode = string<br> })</pre> | `null` | no |
9393
| vpc\_config | Provide this to allow your function to access your VPC. Fields documented below. See Lambda in VPC. | <pre>object({<br> security_group_ids = list(string)<br> subnet_ids = list(string)<br> })</pre> | `null` | no |
94+
| file\_system\_config | Provide this to allow your function to mount your EFS file system. Fields documented below. See Lambda with EFS. | <pre>{<br> efs_access_point_arn = string<br> local_mount_path = string<br>}</pre> | `null` | no |
9495

9596
## Outputs
9697

@@ -109,10 +110,10 @@ module lambda {
109110

110111
<!-- START makefile-doc -->
111112
```
112-
$ make help
113+
$ make help
113114
hooks Commit hooks setup
114115
validate Validate with pre-commit hooks
115-
changelog Update changelog
116+
changelog Update changelog
116117
```
117118
<!-- END makefile-doc -->
118119

main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ resource aws_lambda_function this {
2121
}
2222
}
2323

24+
dynamic "file_system_config" {
25+
for_each = var.file_system_config == null ? [] : [var.file_system_config]
26+
content {
27+
arn = file_system_config.value.efs_access_point_arn
28+
local_mount_path = file_system_config.value.local_mount_path
29+
}
30+
}
31+
2432
dynamic "tracing_config" {
2533
for_each = var.tracing_config == null ? [] : [var.tracing_config]
2634
content {

variables.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ variable "vpc_config" {
5151
})
5252
}
5353

54+
variable "file_system_config" {
55+
default = null
56+
description = "Provide this to allow your function to mount your EFS file system. Fields documented below. See Lambda with EFS."
57+
type = object({
58+
efs_access_point_arn = string
59+
local_mount_path = string
60+
})
61+
}
62+
5463
variable "tracing_config" {
5564
default = null
5665
description = "Use AWS X-Ray to collect data about events that your function processes, and to identify the cause of errors in your serverless applications. Can be either PassThrough or Active."

0 commit comments

Comments
 (0)