File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 2525locals {
2626 deploy_artifact_key = " deploy.zip"
2727 deployment_bucket_id = coalesce (var. deployment_bucket_id , data. aws_ssm_parameter . deployment_bucket_id . value )
28- source_hash = coalesce (var. git_sha , filebase64sha256 (var. path ))
28+ source_hash = coalesce (var. git_sha , try ( filebase64sha256 (var. path ), null ))
2929 role_arn = " arn:aws:iam::${ data . aws_caller_identity . current . account_id } :role/${ var . role_name } "
3030}
3131
@@ -52,7 +52,7 @@ resource "aws_iam_role_policy_attachment" "lambda_insights" {
5252
5353# S3 object to hold the deployed artifact
5454resource "aws_s3_bucket_object" "lambda_deploy_object" {
55- for_each = var. image_uri == null ? [ 1 ] : []
55+ count = var. image_uri == null ? 1 : 0
5656 bucket = local. deployment_bucket_id
5757 key = " ${ var . name } /${ local . deploy_artifact_key } "
5858 source = var. path
You can’t perform that action at this time.
0 commit comments