From c82299aaec22f301c62f220d8446675647168ff4 Mon Sep 17 00:00:00 2001 From: carterjones Date: Wed, 4 May 2022 01:29:59 -0700 Subject: [PATCH] feat: Added ephemeral_storage_size variable (#167) --- README.md | 3 ++- main.tf | 3 ++- variables.tf | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7866a6a7..ee1f2557 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ See the [functions](https://github.com/terraform-aws-modules/terraform-aws-notif | Name | Source | Version | |------|--------|---------| -| [lambda](#module\_lambda) | terraform-aws-modules/lambda/aws | 3.1.0 | +| [lambda](#module\_lambda) | terraform-aws-modules/lambda/aws | 3.2.0 | ## Resources @@ -106,6 +106,7 @@ See the [functions](https://github.com/terraform-aws-modules/terraform-aws-notif | [iam\_role\_tags](#input\_iam\_role\_tags) | Additional tags for the IAM role | `map(string)` | `{}` | no | | [kms\_key\_arn](#input\_kms\_key\_arn) | ARN of the KMS key used for decrypting slack webhook url | `string` | `""` | no | | [lambda\_description](#input\_lambda\_description) | The description of the Lambda function | `string` | `null` | no | +| [lambda\_function\_ephemeral\_storage\_size](#input\_lambda\_function\_ephemeral\_storage\_size) | Amount of ephemeral storage (/tmp) in MB your Lambda Function can use at runtime. Valid value between 512 MB to 10,240 MB (10 GB). | `number` | `512` | no | | [lambda\_function\_name](#input\_lambda\_function\_name) | The name of the Lambda function to create | `string` | `"notify_slack"` | no | | [lambda\_function\_s3\_bucket](#input\_lambda\_function\_s3\_bucket) | S3 bucket to store artifacts | `string` | `null` | no | | [lambda\_function\_store\_on\_s3](#input\_lambda\_function\_store\_on\_s3) | Whether to store produced artifacts on S3 or locally. | `bool` | `false` | no | diff --git a/main.tf b/main.tf index d1b7a672..a7080e88 100644 --- a/main.tf +++ b/main.tf @@ -70,7 +70,7 @@ resource "aws_sns_topic_subscription" "sns_notify_slack" { module "lambda" { source = "terraform-aws-modules/lambda/aws" - version = "3.1.0" + version = "3.2.0" create = var.create @@ -84,6 +84,7 @@ module "lambda" { timeout = 30 kms_key_arn = var.kms_key_arn reserved_concurrent_executions = var.reserved_concurrent_executions + ephemeral_storage_size = var.lambda_function_ephemeral_storage_size # If publish is disabled, there will be "Error adding new Lambda Permission for notify_slack: # InvalidParameterValueException: We currently do not support adding policies for $LATEST." diff --git a/variables.tf b/variables.tf index 76126ec0..daceeae4 100644 --- a/variables.tf +++ b/variables.tf @@ -162,6 +162,12 @@ variable "lambda_function_s3_bucket" { default = null } +variable "lambda_function_ephemeral_storage_size" { + description = "Amount of ephemeral storage (/tmp) in MB your Lambda Function can use at runtime. Valid value between 512 MB to 10,240 MB (10 GB)." + type = number + default = 512 +} + variable "sns_topic_tags" { description = "Additional tags for the SNS topic" type = map(string)