Skip to content

Commit 9470a1d

Browse files
feat: add ephemeral storage variable
1 parent 8cbb9bd commit 9470a1d

File tree

6 files changed

+20
-4
lines changed

6 files changed

+20
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ should migrate to this module as a drop-in replacement to benefit from new featu
336336

337337
| Name | Version |
338338
|------|---------|
339-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.38.0 |
339+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.45.0 |
340340

341341
## Modules
342342

@@ -386,6 +386,7 @@ No modules.
386386
| <a name="input_cloudwatch_logs_retention_in_days"></a> [cloudwatch\_logs\_retention\_in\_days](#input\_cloudwatch\_logs\_retention\_in\_days) | Specifies the number of days you want to retain log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. | `number` | `null` | no |
387387
| <a name="input_description"></a> [description](#input\_description) | Description of what your Lambda Function does. | `string` | `"Instruction set architecture for your Lambda function. Valid values are [\"x86_64\"] and [\"arm64\"]."` | no |
388388
| <a name="input_environment"></a> [environment](#input\_environment) | Environment (e.g. env variables) configuration for the Lambda function enable you to dynamically pass settings to your function code and libraries | <pre>object({<br> variables = map(string)<br> })</pre> | `null` | no |
389+
| <a name="input_ephemeral_storage"></a> [ephemeral\_storage](#input\_ephemeral\_storage) | ephemeral\_storage - The amount of Ephemeral storage (/tmp) to allocate for the Lambda Function in MB. This parameter is used to expand the total amount of Ephemeral storage available, beyond the default amount of 512MB. | `number` | `null` | no |
389390
| <a name="input_event_source_mappings"></a> [event\_source\_mappings](#input\_event\_source\_mappings) | Creates event source mappings to allow the Lambda function to get events from Kinesis, DynamoDB and SQS. The IAM role of this Lambda function will be enhanced with necessary minimum permissions to get those events. | `any` | `{}` | no |
390391
| <a name="input_filename"></a> [filename](#input\_filename) | The path to the function's deployment package within the local filesystem. If defined, The s3\_-prefixed options and image\_uri cannot be used. | `string` | `null` | no |
391392
| <a name="input_function_name"></a> [function\_name](#input\_function\_name) | A unique name for your Lambda Function. | `string` | n/a | yes |

docs/deployment/part2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
| Name | Version |
1111
|------|---------|
12-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.38.0 |
12+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.40 |
1313

1414
## Modules
1515

docs/part2.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
| Name | Version |
1111
|------|---------|
12-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.38.0 |
12+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.45.0 |
1313

1414
## Modules
1515

@@ -59,6 +59,7 @@ No modules.
5959
| <a name="input_cloudwatch_logs_retention_in_days"></a> [cloudwatch\_logs\_retention\_in\_days](#input\_cloudwatch\_logs\_retention\_in\_days) | Specifies the number of days you want to retain log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. | `number` | `null` | no |
6060
| <a name="input_description"></a> [description](#input\_description) | Description of what your Lambda Function does. | `string` | `"Instruction set architecture for your Lambda function. Valid values are [\"x86_64\"] and [\"arm64\"]."` | no |
6161
| <a name="input_environment"></a> [environment](#input\_environment) | Environment (e.g. env variables) configuration for the Lambda function enable you to dynamically pass settings to your function code and libraries | <pre>object({<br> variables = map(string)<br> })</pre> | `null` | no |
62+
| <a name="input_ephemeral_storage"></a> [ephemeral\_storage](#input\_ephemeral\_storage) | ephemeral\_storage - The amount of Ephemeral storage (/tmp) to allocate for the Lambda Function in MB. This parameter is used to expand the total amount of Ephemeral storage available, beyond the default amount of 512MB. | `number` | `null` | no |
6263
| <a name="input_event_source_mappings"></a> [event\_source\_mappings](#input\_event\_source\_mappings) | Creates event source mappings to allow the Lambda function to get events from Kinesis, DynamoDB and SQS. The IAM role of this Lambda function will be enhanced with necessary minimum permissions to get those events. | `any` | `{}` | no |
6364
| <a name="input_filename"></a> [filename](#input\_filename) | The path to the function's deployment package within the local filesystem. If defined, The s3\_-prefixed options and image\_uri cannot be used. | `string` | `null` | no |
6465
| <a name="input_function_name"></a> [function\_name](#input\_function\_name) | A unique name for your Lambda Function. | `string` | n/a | yes |

main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ resource "aws_lambda_function" "lambda" {
3535
tags = var.tags
3636
timeout = local.timeout
3737

38+
ephemeral_storage {
39+
size = var.ephemeral_storage
40+
}
41+
3842
dynamic "environment" {
3943
for_each = var.environment == null ? [] : [var.environment]
4044
content {
@@ -97,6 +101,10 @@ resource "aws_lambda_function" "lambda_external_lifecycle" {
97101
tags = var.tags
98102
timeout = local.timeout
99103

104+
ephemeral_storage {
105+
size = var.ephemeral_storage
106+
}
107+
100108
dynamic "environment" {
101109
for_each = var.environment == null ? [] : [var.environment]
102110
content {

modules/deployment/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ resource "aws_s3_bucket_object" "source" {
173173

174174
| Name | Version |
175175
|------|---------|
176-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.38.0 |
176+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.40 |
177177

178178
## Modules
179179

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ variable "environment" {
6969
})
7070
}
7171

72+
variable "ephemeral_storage" {
73+
description = "ephemeral_storage - The amount of Ephemeral storage (/tmp) to allocate for the Lambda Function in MB. This parameter is used to expand the total amount of Ephemeral storage available, beyond the default amount of 512MB."
74+
default = null
75+
type = number
76+
}
77+
7278
variable "event_source_mappings" {
7379
description = "Creates event source mappings to allow the Lambda function to get events from Kinesis, DynamoDB and SQS. The IAM role of this Lambda function will be enhanced with necessary minimum permissions to get those events."
7480
default = {}

0 commit comments

Comments
 (0)