Skip to content

Commit

Permalink
fix: making the uploaded files public
Browse files Browse the repository at this point in the history
  • Loading branch information
cka-y committed Sep 27, 2023
1 parent 24d668e commit 9b58926
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 1 addition & 0 deletions infra/batch/datasets/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def upload_dataset(url, bucket_name, stable_id, latest_hash):
timestamp = current_time.strftime("%Y%m%d")
timestamp_blob = bucket.blob(f"{stable_id}/{timestamp}.zip")
timestamp_blob.upload_from_string(content, timeout=300)
timestamp_blob.make_public()
return file_sha256_hash, timestamp_blob.public_url

else:
Expand Down
7 changes: 0 additions & 7 deletions infra/batch/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ resource "google_storage_bucket" "bucket" {
location = var.gcp_region
}

resource "google_storage_bucket_acl" "my_bucket_acl" {
bucket = google_storage_bucket.bucket.name
role_entity = [
"READER:allUsers"
]
}


resource "google_storage_bucket_object" "object" {
name = "${var.source_code_path}${filesha256(var.source_code_zip_file)}.zip"
Expand Down

0 comments on commit 9b58926

Please sign in to comment.