diff --git a/aws/resource_aws_lambda_layer_version_test.go b/aws/resource_aws_lambda_layer_version_test.go index c656fa99234d..294feb65062b 100644 --- a/aws/resource_aws_lambda_layer_version_test.go +++ b/aws/resource_aws_lambda_layer_version_test.go @@ -330,7 +330,7 @@ func testAccAWSLambdaLayerVersionCreateBeforeDestroy(layerName string, filename resource "aws_lambda_layer_version" "lambda_layer_test" { filename = "%s" layer_name = "%s" - source_code_hash = "${base64sha256(file("%s"))}" + source_code_hash = "${filebase64sha256("%s")}" lifecycle { create_before_destroy = true diff --git a/website/docs/r/lambda_layer_version.html.markdown b/website/docs/r/lambda_layer_version.html.markdown index 889f7d1cad5f..5078a07e8b8e 100644 --- a/website/docs/r/lambda_layer_version.html.markdown +++ b/website/docs/r/lambda_layer_version.html.markdown @@ -45,7 +45,7 @@ large files efficiently. * `compatible_runtimes` - (Optional) A list of [Runtimes][2] this layer is compatible with. Up to 5 runtimes can be specified. * `description` - (Optional) Description of what your Lambda Layer does. * `license_info` - (Optional) License info for your Lambda Layer. See [License Info][3]. -* `source_code_hash` - (Optional) Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3_key`. The usual way to set this is `${base64sha256(file("file.zip"))}`, where "file.zip" is the local filename of the lambda layer source archive. +* `source_code_hash` - (Optional) Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3_key`. The usual way to set this is `${filebase64sha256("file.zip")}` (Terraform 0.11.12 or later) or `${base64sha256(file("file.zip"))}` (Terraform 0.11.11 and earlier), where "file.zip" is the local filename of the lambda layer source archive. ## Attributes Reference