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 @@ -32,8 +32,12 @@ resource "null_resource" "lambda_zip" {
3232 }
3333}
3434
35- data "http_http" "shasum" {
36- url = " https://github.com/${ local . repo_full_name } /releases/download/${ local . lambda_version_tag } /lambda.sha256sum.base64"
35+ data "http" "shasum" {
36+ url = " https://github.com/${ local . repo_full_name } /releases/download/${ local . lambda_version_tag } /lambda.sha256base64"
37+
38+ request_headers = {
39+ Accept = " text/plain"
40+ }
3741}
3842
3943data "aws_iam_policy_document" "lambda_assume_role_policy" {
@@ -107,7 +111,7 @@ resource "aws_lambda_function" "this" {
107111 handler = " rolling-restart.handler"
108112 runtime = " python3.6"
109113 timeout = 600
110- source_code_hash = filebase64sha256 ( " lambda- ${ local . lambda_version } .zip " )
114+ source_code_hash = data . http . shasum . body
111115 tags = module. tags . tags
112116
113117 environment {
You can’t perform that action at this time.
0 commit comments