Skip to content

Commit 0a1ab91

Browse files
authored
Merge branch 'master' into feat/add-log-group-deletion-protection
2 parents 751ff08 + aadff8d commit 0a1ab91

File tree

29 files changed

+267
-151
lines changed

29 files changed

+267
-151
lines changed

CHANGELOG.md

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

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

5+
## [8.5.1](https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v8.5.0...v8.5.1) (2026-02-18)
6+
7+
### Bug Fixes
8+
9+
* Fix error with inconsistent values for fileexists when setting the source code hash ([#734](https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/734)) ([99a1bc5](https://github.com/terraform-aws-modules/terraform-aws-lambda/commit/99a1bc50e332dc8702216faf5c0380cbbe11c89c))
10+
511
## [8.5.0](https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v8.4.0...v8.5.0) (2026-02-02)
612

713
### Features

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -529,23 +529,18 @@ locals {
529529
downloaded = "downloaded_package_${md5(local.package_url)}.zip"
530530
}
531531
532-
resource "null_resource" "download_package" {
533-
triggers = {
534-
downloaded = local.downloaded
532+
resource "terraform_data" "download_package" {
533+
input = {
534+
filename = local.downloaded
535535
}
536536
537+
triggers_replace = [local.downloaded]
538+
537539
provisioner "local-exec" {
538540
command = "curl -L -o ${local.downloaded} ${local.package_url}"
539541
}
540542
}
541543
542-
data "null_data_source" "downloaded_package" {
543-
inputs = {
544-
id = null_resource.download_package.id
545-
filename = local.downloaded
546-
}
547-
}
548-
549544
module "lambda_function_existing_package_from_remote_url" {
550545
source = "terraform-aws-modules/lambda/aws"
551546
@@ -555,7 +550,7 @@ module "lambda_function_existing_package_from_remote_url" {
555550
runtime = "python3.12"
556551
557552
create_package = false
558-
local_existing_package = data.null_data_source.downloaded_package.outputs["filename"]
553+
local_existing_package = terraform_data.download_package.output.filename
559554
}
560555
```
561556

@@ -882,6 +877,7 @@ No modules.
882877
| <a name="output_lambda_event_source_mapping_uuid"></a> [lambda\_event\_source\_mapping\_uuid](#output\_lambda\_event\_source\_mapping\_uuid) | The UUID of the created event source mapping |
883878
| <a name="output_lambda_function_arn"></a> [lambda\_function\_arn](#output\_lambda\_function\_arn) | The ARN of the Lambda Function |
884879
| <a name="output_lambda_function_arn_static"></a> [lambda\_function\_arn\_static](#output\_lambda\_function\_arn\_static) | The static ARN of the Lambda Function. Use this to avoid cycle errors between resources (e.g., Step Functions) |
880+
| <a name="output_lambda_function_code_sha256"></a> [lambda\_function\_code\_sha256](#output\_lambda\_function\_code\_sha256) | The base64-encoded representation of the source code package file |
885881
| <a name="output_lambda_function_invoke_arn"></a> [lambda\_function\_invoke\_arn](#output\_lambda\_function\_invoke\_arn) | The Invoke ARN of the Lambda Function |
886882
| <a name="output_lambda_function_kms_key_arn"></a> [lambda\_function\_kms\_key\_arn](#output\_lambda\_function\_kms\_key\_arn) | The ARN for the KMS encryption key of Lambda Function |
887883
| <a name="output_lambda_function_last_modified"></a> [lambda\_function\_last\_modified](#output\_lambda\_function\_last\_modified) | The date Lambda Function resource was last modified |
@@ -890,14 +886,16 @@ No modules.
890886
| <a name="output_lambda_function_qualified_invoke_arn"></a> [lambda\_function\_qualified\_invoke\_arn](#output\_lambda\_function\_qualified\_invoke\_arn) | The Invoke ARN identifying your Lambda Function Version |
891887
| <a name="output_lambda_function_signing_job_arn"></a> [lambda\_function\_signing\_job\_arn](#output\_lambda\_function\_signing\_job\_arn) | ARN of the signing job |
892888
| <a name="output_lambda_function_signing_profile_version_arn"></a> [lambda\_function\_signing\_profile\_version\_arn](#output\_lambda\_function\_signing\_profile\_version\_arn) | ARN of the signing profile version |
893-
| <a name="output_lambda_function_source_code_hash"></a> [lambda\_function\_source\_code\_hash](#output\_lambda\_function\_source\_code\_hash) | Base64-encoded representation of raw SHA-256 sum of the zip file |
889+
| <a name="output_lambda_function_source_code_hash"></a> [lambda\_function\_source\_code\_hash](#output\_lambda\_function\_source\_code\_hash) | The user-defined hash of the source code package file |
894890
| <a name="output_lambda_function_source_code_size"></a> [lambda\_function\_source\_code\_size](#output\_lambda\_function\_source\_code\_size) | The size in bytes of the function .zip file |
895891
| <a name="output_lambda_function_url"></a> [lambda\_function\_url](#output\_lambda\_function\_url) | The URL of the Lambda Function URL |
896892
| <a name="output_lambda_function_url_id"></a> [lambda\_function\_url\_id](#output\_lambda\_function\_url\_id) | The Lambda Function URL generated id |
897893
| <a name="output_lambda_function_version"></a> [lambda\_function\_version](#output\_lambda\_function\_version) | Latest published version of Lambda Function |
898894
| <a name="output_lambda_layer_arn"></a> [lambda\_layer\_arn](#output\_lambda\_layer\_arn) | The ARN of the Lambda Layer with version |
895+
| <a name="output_lambda_layer_code_sha256"></a> [lambda\_layer\_code\_sha256](#output\_lambda\_layer\_code\_sha256) | The base64-encoded representation of the Lambda Layer source code package file |
899896
| <a name="output_lambda_layer_created_date"></a> [lambda\_layer\_created\_date](#output\_lambda\_layer\_created\_date) | The date Lambda Layer resource was created |
900897
| <a name="output_lambda_layer_layer_arn"></a> [lambda\_layer\_layer\_arn](#output\_lambda\_layer\_layer\_arn) | The ARN of the Lambda Layer without version |
898+
| <a name="output_lambda_layer_source_code_hash"></a> [lambda\_layer\_source\_code\_hash](#output\_lambda\_layer\_source\_code\_hash) | The user-defined hash of the Lambda Layer source code package file |
901899
| <a name="output_lambda_layer_source_code_size"></a> [lambda\_layer\_source\_code\_size](#output\_lambda\_layer\_source\_code\_size) | The size in bytes of the Lambda Layer .zip file |
902900
| <a name="output_lambda_layer_version"></a> [lambda\_layer\_version](#output\_lambda\_layer\_version) | The Lambda Layer version |
903901
| <a name="output_lambda_role_arn"></a> [lambda\_role\_arn](#output\_lambda\_role\_arn) | The ARN of the IAM role created for the Lambda Function |

examples/alias/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,20 @@ No inputs.
6666
| <a name="output_lambda_alias_name"></a> [lambda\_alias\_name](#output\_lambda\_alias\_name) | The name of the Lambda Function Alias |
6767
| <a name="output_lambda_function_arn"></a> [lambda\_function\_arn](#output\_lambda\_function\_arn) | The ARN of the Lambda Function |
6868
| <a name="output_lambda_function_arn_static"></a> [lambda\_function\_arn\_static](#output\_lambda\_function\_arn\_static) | The static ARN of the Lambda Function. Use this to avoid cycle errors between resources (e.g., Step Functions) |
69+
| <a name="output_lambda_function_code_sha256"></a> [lambda\_function\_code\_sha256](#output\_lambda\_function\_code\_sha256) | The base64-encoded representation of the source code package file |
6970
| <a name="output_lambda_function_invoke_arn"></a> [lambda\_function\_invoke\_arn](#output\_lambda\_function\_invoke\_arn) | The Invoke ARN of the Lambda Function |
7071
| <a name="output_lambda_function_kms_key_arn"></a> [lambda\_function\_kms\_key\_arn](#output\_lambda\_function\_kms\_key\_arn) | The ARN for the KMS encryption key of Lambda Function |
7172
| <a name="output_lambda_function_last_modified"></a> [lambda\_function\_last\_modified](#output\_lambda\_function\_last\_modified) | The date Lambda Function resource was last modified |
7273
| <a name="output_lambda_function_name"></a> [lambda\_function\_name](#output\_lambda\_function\_name) | The name of the Lambda Function |
7374
| <a name="output_lambda_function_qualified_arn"></a> [lambda\_function\_qualified\_arn](#output\_lambda\_function\_qualified\_arn) | The ARN identifying your Lambda Function Version |
74-
| <a name="output_lambda_function_source_code_hash"></a> [lambda\_function\_source\_code\_hash](#output\_lambda\_function\_source\_code\_hash) | Base64-encoded representation of raw SHA-256 sum of the zip file |
75+
| <a name="output_lambda_function_source_code_hash"></a> [lambda\_function\_source\_code\_hash](#output\_lambda\_function\_source\_code\_hash) | The user-defined hash of the source code package file |
7576
| <a name="output_lambda_function_source_code_size"></a> [lambda\_function\_source\_code\_size](#output\_lambda\_function\_source\_code\_size) | The size in bytes of the function .zip file |
7677
| <a name="output_lambda_function_version"></a> [lambda\_function\_version](#output\_lambda\_function\_version) | Latest published version of Lambda Function |
7778
| <a name="output_lambda_layer_arn"></a> [lambda\_layer\_arn](#output\_lambda\_layer\_arn) | The ARN of the Lambda Layer with version |
79+
| <a name="output_lambda_layer_code_sha256"></a> [lambda\_layer\_code\_sha256](#output\_lambda\_layer\_code\_sha256) | The base64-encoded representation of the Lambda Layer source code package file |
7880
| <a name="output_lambda_layer_created_date"></a> [lambda\_layer\_created\_date](#output\_lambda\_layer\_created\_date) | The date Lambda Layer resource was created |
7981
| <a name="output_lambda_layer_layer_arn"></a> [lambda\_layer\_layer\_arn](#output\_lambda\_layer\_layer\_arn) | The ARN of the Lambda Layer without version |
82+
| <a name="output_lambda_layer_source_code_hash"></a> [lambda\_layer\_source\_code\_hash](#output\_lambda\_layer\_source\_code\_hash) | The user-defined hash of the Lambda Layer source code package file |
8083
| <a name="output_lambda_layer_source_code_size"></a> [lambda\_layer\_source\_code\_size](#output\_lambda\_layer\_source\_code\_size) | The size in bytes of the Lambda Layer .zip file |
8184
| <a name="output_lambda_layer_version"></a> [lambda\_layer\_version](#output\_lambda\_layer\_version) | The Lambda Layer version |
8285
| <a name="output_lambda_role_arn"></a> [lambda\_role\_arn](#output\_lambda\_role\_arn) | The ARN of the IAM role created for the Lambda Function |

examples/alias/outputs.tf

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ output "lambda_function_arn_static" {
99
value = module.lambda_function.lambda_function_arn_static
1010
}
1111

12+
output "lambda_function_code_sha256" {
13+
description = "The base64-encoded representation of the source code package file"
14+
value = module.lambda_function.lambda_function_code_sha256
15+
}
16+
1217
output "lambda_function_invoke_arn" {
1318
description = "The Invoke ARN of the Lambda Function"
1419
value = module.lambda_function.lambda_function_invoke_arn
@@ -40,7 +45,7 @@ output "lambda_function_kms_key_arn" {
4045
}
4146

4247
output "lambda_function_source_code_hash" {
43-
description = "Base64-encoded representation of raw SHA-256 sum of the zip file"
48+
description = "The user-defined hash of the source code package file"
4449
value = module.lambda_function.lambda_function_source_code_hash
4550
}
4651

@@ -60,11 +65,21 @@ output "lambda_layer_layer_arn" {
6065
value = module.lambda_function.lambda_layer_layer_arn
6166
}
6267

68+
output "lambda_layer_code_sha256" {
69+
description = "The base64-encoded representation of the Lambda Layer source code package file"
70+
value = module.lambda_function.lambda_layer_code_sha256
71+
}
72+
6373
output "lambda_layer_created_date" {
6474
description = "The date Lambda Layer resource was created"
6575
value = module.lambda_function.lambda_layer_created_date
6676
}
6777

78+
output "lambda_layer_source_code_hash" {
79+
description = "The user-defined hash of the Lambda Layer source code package file"
80+
value = module.lambda_function.lambda_layer_source_code_hash
81+
}
82+
6883
output "lambda_layer_source_code_size" {
6984
description = "The size in bytes of the Lambda Layer .zip file"
7085
value = module.lambda_function.lambda_layer_source_code_size

examples/async/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,20 @@ No inputs.
5555
| <a name="output_lambda_cloudwatch_log_group_arn"></a> [lambda\_cloudwatch\_log\_group\_arn](#output\_lambda\_cloudwatch\_log\_group\_arn) | The ARN of the Cloudwatch Log Group |
5656
| <a name="output_lambda_function_arn"></a> [lambda\_function\_arn](#output\_lambda\_function\_arn) | The ARN of the Lambda Function |
5757
| <a name="output_lambda_function_arn_static"></a> [lambda\_function\_arn\_static](#output\_lambda\_function\_arn\_static) | The static ARN of the Lambda Function. Use this to avoid cycle errors between resources (e.g., Step Functions) |
58+
| <a name="output_lambda_function_code_sha256"></a> [lambda\_function\_code\_sha256](#output\_lambda\_function\_code\_sha256) | The base64-encoded representation of the source code package file |
5859
| <a name="output_lambda_function_invoke_arn"></a> [lambda\_function\_invoke\_arn](#output\_lambda\_function\_invoke\_arn) | The Invoke ARN of the Lambda Function |
5960
| <a name="output_lambda_function_kms_key_arn"></a> [lambda\_function\_kms\_key\_arn](#output\_lambda\_function\_kms\_key\_arn) | The ARN for the KMS encryption key of Lambda Function |
6061
| <a name="output_lambda_function_last_modified"></a> [lambda\_function\_last\_modified](#output\_lambda\_function\_last\_modified) | The date Lambda Function resource was last modified |
6162
| <a name="output_lambda_function_name"></a> [lambda\_function\_name](#output\_lambda\_function\_name) | The name of the Lambda Function |
6263
| <a name="output_lambda_function_qualified_arn"></a> [lambda\_function\_qualified\_arn](#output\_lambda\_function\_qualified\_arn) | The ARN identifying your Lambda Function Version |
63-
| <a name="output_lambda_function_source_code_hash"></a> [lambda\_function\_source\_code\_hash](#output\_lambda\_function\_source\_code\_hash) | Base64-encoded representation of raw SHA-256 sum of the zip file |
64+
| <a name="output_lambda_function_source_code_hash"></a> [lambda\_function\_source\_code\_hash](#output\_lambda\_function\_source\_code\_hash) | The user-defined hash of the source code package file |
6465
| <a name="output_lambda_function_source_code_size"></a> [lambda\_function\_source\_code\_size](#output\_lambda\_function\_source\_code\_size) | The size in bytes of the function .zip file |
6566
| <a name="output_lambda_function_version"></a> [lambda\_function\_version](#output\_lambda\_function\_version) | Latest published version of Lambda Function |
6667
| <a name="output_lambda_layer_arn"></a> [lambda\_layer\_arn](#output\_lambda\_layer\_arn) | The ARN of the Lambda Layer with version |
68+
| <a name="output_lambda_layer_code_sha256"></a> [lambda\_layer\_code\_sha256](#output\_lambda\_layer\_code\_sha256) | The base64-encoded representation of the Lambda Layer source code package file |
6769
| <a name="output_lambda_layer_created_date"></a> [lambda\_layer\_created\_date](#output\_lambda\_layer\_created\_date) | The date Lambda Layer resource was created |
6870
| <a name="output_lambda_layer_layer_arn"></a> [lambda\_layer\_layer\_arn](#output\_lambda\_layer\_layer\_arn) | The ARN of the Lambda Layer without version |
71+
| <a name="output_lambda_layer_source_code_hash"></a> [lambda\_layer\_source\_code\_hash](#output\_lambda\_layer\_source\_code\_hash) | The user-defined hash of the Lambda Layer source code package file |
6972
| <a name="output_lambda_layer_source_code_size"></a> [lambda\_layer\_source\_code\_size](#output\_lambda\_layer\_source\_code\_size) | The size in bytes of the Lambda Layer .zip file |
7073
| <a name="output_lambda_layer_version"></a> [lambda\_layer\_version](#output\_lambda\_layer\_version) | The Lambda Layer version |
7174
| <a name="output_lambda_role_arn"></a> [lambda\_role\_arn](#output\_lambda\_role\_arn) | The ARN of the IAM role created for the Lambda Function |

examples/async/outputs.tf

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ output "lambda_function_arn_static" {
99
value = module.lambda_function.lambda_function_arn_static
1010
}
1111

12+
output "lambda_function_code_sha256" {
13+
description = "The base64-encoded representation of the source code package file"
14+
value = module.lambda_function.lambda_function_code_sha256
15+
}
16+
1217
output "lambda_function_invoke_arn" {
1318
description = "The Invoke ARN of the Lambda Function"
1419
value = module.lambda_function.lambda_function_invoke_arn
@@ -40,7 +45,7 @@ output "lambda_function_kms_key_arn" {
4045
}
4146

4247
output "lambda_function_source_code_hash" {
43-
description = "Base64-encoded representation of raw SHA-256 sum of the zip file"
48+
description = "The user-defined hash of the source code package file"
4449
value = module.lambda_function.lambda_function_source_code_hash
4550
}
4651

@@ -60,11 +65,21 @@ output "lambda_layer_layer_arn" {
6065
value = module.lambda_function.lambda_layer_layer_arn
6166
}
6267

68+
output "lambda_layer_code_sha256" {
69+
description = "The base64-encoded representation of the Lambda Layer source code package file"
70+
value = module.lambda_function.lambda_layer_code_sha256
71+
}
72+
6373
output "lambda_layer_created_date" {
6474
description = "The date Lambda Layer resource was created"
6575
value = module.lambda_function.lambda_layer_created_date
6676
}
6777

78+
output "lambda_layer_source_code_hash" {
79+
description = "The user-defined hash of the Lambda Layer source code package file"
80+
value = module.lambda_function.lambda_layer_source_code_hash
81+
}
82+
6883
output "lambda_layer_source_code_size" {
6984
description = "The size in bytes of the Lambda Layer .zip file"
7085
value = module.lambda_function.lambda_layer_source_code_size

0 commit comments

Comments
 (0)