From 376f40d7201f610f02e825f82de8f415f6ad03f6 Mon Sep 17 00:00:00 2001 From: Siddhartha Bagaria Date: Sun, 5 Mar 2023 10:06:37 -0800 Subject: [PATCH] fix: remove gzip content-encoding metadata on function source archive The gzip content encoding is not right for a zip archive and does not actually work. When working with this module, I had to remove the content-encoding to make things work. Otherwise, I was getting a "End-of-central-directory signature not found" error in Cloud Build during function deployment. When I tried to download the archive using my browser, the browser errored, but gsutil succeeded. The file uploaded to GCS was complete so that was not the reason for the error. Removing the content-encoding field fixed the deployment. --- main.tf | 1 - 1 file changed, 1 deletion(-) diff --git a/main.tf b/main.tf index f50a270..b06fa7a 100644 --- a/main.tf +++ b/main.tf @@ -84,7 +84,6 @@ resource "google_storage_bucket_object" "main" { bucket = var.create_bucket ? google_storage_bucket.main[0].name : var.bucket_name source = data.archive_file.main.output_path content_disposition = "attachment" - content_encoding = "gzip" content_type = "application/zip" }