From d1f49e573e37d9ae4510ce8129de5766095e8300 Mon Sep 17 00:00:00 2001 From: mnasr-moj Date: Tue, 3 Dec 2024 14:14:15 +0000 Subject: [PATCH] terraform plan says the hash value has changed if I try to use the checksum_256 attribute from aws_s3_object, so reverting back to hard coded value --- terraform/environments/apex/lambda.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/environments/apex/lambda.tf b/terraform/environments/apex/lambda.tf index cab4f0c177d..5b02d01a6cf 100644 --- a/terraform/environments/apex/lambda.tf +++ b/terraform/environments/apex/lambda.tf @@ -212,7 +212,7 @@ resource "aws_lambda_layer_version" "backup_lambda" { license_info = "Apache-2.0" s3_bucket = aws_s3_bucket.backup_lambda.id s3_key = "nodejs.zip" - source_code_hash = data.aws_s3_object.nodejs_zip.checksum_sha256 + source_code_hash = local.hash_value # Since the nodejs.zip file has been added manually to the s3 bucket the source_code_hash would have to be computed and added manually as well anytime there's a change to nodejs.zip # This command allows you to retrieve the hash - openssl dgst -sha256 -binary nodejs.zip | base64 compatible_runtimes = ["nodejs18.x"]