File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,12 @@ jobs:
2626 if-no-files-found : error
2727
2828 - name : get checksum
29- run : cat lambda.zip | openssl dgst -binary -sha256 | base64 > lambda.sha256sum.base64
29+ run : cat lambda.zip | openssl dgst -binary -sha256 | base64 > lambda.sha256base64
3030
3131 - name : upload shasum artifact
3232 uses : actions/upload-artifact@v2
3333 with :
34- name : lambda.sha256sum.base64
34+ name : lambda.sha256base64
3535 path : ${{ github.workspace }}/lambda.zip
3636 if-no-files-found : error
3737
5353 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5454 with :
5555 upload_url : ${{ github.event.release.upload_url }}
56- asset_path : ./lambda.sha256sum.base64
57- asset_name : lambda.sha256sum.base64
56+ asset_path : ./lambda.sha256base64
57+ asset_name : lambda.sha256base64
5858 asset_content_type : text/plain
Original file line number Diff line number Diff line change @@ -33,8 +33,12 @@ resource "null_resource" "lambda_zip" {
3333 }
3434}
3535
36- data "http_http" "shasum" {
37- url = " https://github.com/${ local . repo_full_name } /releases/download/${ local . lambda_version_tag } /lambda.sha256sum.base64"
36+ data "http" "shasum" {
37+ url = " https://github.com/${ local . repo_full_name } /releases/download/${ local . lambda_version_tag } /lambda.sha256base64"
38+
39+ request_headers = {
40+ Accept = " text/plain"
41+ }
3842}
3943
4044data "aws_iam_policy_document" "lambda_assume_role_policy" {
@@ -108,7 +112,7 @@ resource "aws_lambda_function" "this" {
108112 handler = " rolling-restart.handler"
109113 runtime = " python3.6"
110114 timeout = 600
111- source_code_hash = filebase64sha256 ( " lambda- ${ local . lambda_version } .zip " )
115+ source_code_hash = data . http . shasum . body
112116 tags = module. tags . tags
113117
114118 environment {
You can’t perform that action at this time.
0 commit comments