Provider error when deploying Lambda layer

Hi,
I have terraform configuration file for creating lambda layer with the code package in s3.

below my code :

resource “aws_s3_bucket_object” “nodejs_lambda_layer” {
bucket = data.terraform_remote_state.app_common.outputs.bucket_kyc_id[0]
key = “layer/{local.name-prefix}-sls-node.zip" source = "{path.module}/packages/sls/lib.zip”
etag = filemd5("${path.module}/packages/sls/lib.zip")
}

resource “aws_lambda_layer_version” “nodejs_lambda_layer” {
s3_bucket = data.terraform_remote_state.app_common.outputs.bucket_kyc_id[0]
s3_key = aws_s3_bucket_object.nodejs_lambda_layer.id
s3_object_version = aws_s3_bucket_object.nodejs_lambda_layer.version_id
layer_name = “${local.name-prefix}-sls-node”
source_code_hash = base64encode(aws_s3_bucket_object.nodejs_lambda_layer.etag)
compatible_runtimes = [“nodejs12.x”]

When deploying via jenkins i get the following error :

Error: Provider produced inconsistent final plan

When expanding the plan for aws_lambda_layer_version.nodejs_lambda_layer to
include new values learned so far during apply, provider
registry.terraform.io/hashicorp/aws” produced an invalid new value for
.source_code_hash: was
ty.StringVal(“MTZhMDI3ZTc3ZGYxODJjMjRhNzU0MWU3NDQ4ZTZjNTc=”), but now
cty.StringVal(“NWUyOTc4Y2RjNmQ0NTkzYWM3YWQ3YjIxM2QwYTQwNTEtMjI=”).

This is a bug in the provider, which should be reported in the provider’s own
issue tracker.

Best regards