Skip to content

Commit e0f7f52

Browse files
authored
Merge branch 'master' into master
2 parents affbfc7 + a84d8af commit e0f7f52

File tree

6 files changed

+17
-1
lines changed

6 files changed

+17
-1
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.91.0
3+
rev: v1.92.2
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_wrapper_module_for_each

CHANGELOG.md

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

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

5+
## [7.8.0](https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v7.7.1...v7.8.0) (2024-08-23)
6+
7+
8+
### Features
9+
10+
* Added the skip_destroy argument for functions ([#600](https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/600)) ([36c6109](https://github.com/terraform-aws-modules/terraform-aws-lambda/commit/36c61093dbb6114f9880d40b225e7f00f83493f9))
11+
512
## [7.7.1](https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v7.7.0...v7.7.1) (2024-07-25)
613

714

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,7 @@ No modules.
855855
| <a name="input_s3_object_tags_only"></a> [s3\_object\_tags\_only](#input\_s3\_object\_tags\_only) | Set to true to not merge tags with s3\_object\_tags. Useful to avoid breaching S3 Object 10 tag limit. | `bool` | `false` | no |
856856
| <a name="input_s3_prefix"></a> [s3\_prefix](#input\_s3\_prefix) | Directory name where artifacts should be stored in the S3 bucket. If unset, the path from `artifacts_dir` is used | `string` | `null` | no |
857857
| <a name="input_s3_server_side_encryption"></a> [s3\_server\_side\_encryption](#input\_s3\_server\_side\_encryption) | Specifies server-side encryption of the object in S3. Valid values are "AES256" and "aws:kms". | `string` | `null` | no |
858+
| <a name="input_skip_destroy"></a> [skip\_destroy](#input\_skip\_destroy) | Set to true if you do not wish the function to be deleted at destroy time, and instead just remove the function from the Terraform state. Useful for Lambda@Edge functions attached to CloudFront distributions. | `bool` | `null` | no |
858859
| <a name="input_snap_start"></a> [snap\_start](#input\_snap\_start) | (Optional) Snap start settings for low-latency startups | `bool` | `false` | no |
859860
| <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 |
860861
| <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 |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ resource "aws_lambda_function" "this" {
4141
code_signing_config_arn = var.code_signing_config_arn
4242
replace_security_groups_on_destroy = var.replace_security_groups_on_destroy
4343
replacement_security_group_ids = var.replacement_security_group_ids
44+
skip_destroy = var.skip_destroy
4445

4546
/* ephemeral_storage is not supported in gov-cloud region, so it should be set to `null` */
4647
dynamic "ephemeral_storage" {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,12 @@ variable "timeouts" {
254254
default = {}
255255
}
256256

257+
variable "skip_destroy" {
258+
description = "Set to true if you do not wish the function to be deleted at destroy time, and instead just remove the function from the Terraform state. Useful for Lambda@Edge functions attached to CloudFront distributions."
259+
type = bool
260+
default = null
261+
}
262+
257263
###############
258264
# Function URL
259265
###############

wrappers/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ module "wrapper" {
119119
s3_object_tags_only = try(each.value.s3_object_tags_only, var.defaults.s3_object_tags_only, false)
120120
s3_prefix = try(each.value.s3_prefix, var.defaults.s3_prefix, null)
121121
s3_server_side_encryption = try(each.value.s3_server_side_encryption, var.defaults.s3_server_side_encryption, null)
122+
skip_destroy = try(each.value.skip_destroy, var.defaults.skip_destroy, null)
122123
snap_start = try(each.value.snap_start, var.defaults.snap_start, false)
123124
source_path = try(each.value.source_path, var.defaults.source_path, null)
124125
store_on_s3 = try(each.value.store_on_s3, var.defaults.store_on_s3, false)

0 commit comments

Comments
 (0)