diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2024-12-27 21:22:35 +0000 |
|---|---|---|
| committer | Santo Cariotti <santo@dcariotti.me> | 2024-12-27 21:22:35 +0000 |
| commit | 299f5ab9c38834fc58b2f2a434c1495ac3d1c554 (patch) | |
| tree | 319dbf5aa7a9d507b985760e860934484002ca4b /scripts/01-create-bucket.sh | |
| parent | fc35b02c84c94d5965a8317df6312c9a3ececc68 (diff) | |
Add scripts
Diffstat (limited to 'scripts/01-create-bucket.sh')
| -rwxr-xr-x | scripts/01-create-bucket.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/01-create-bucket.sh b/scripts/01-create-bucket.sh new file mode 100755 index 0000000..fb853c9 --- /dev/null +++ b/scripts/01-create-bucket.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +read -p "Enter 'order_products.csv' path: " path + +gcloud storage buckets create gs://$BUCKET_NAME --location=eu +gcloud storage buckets add-iam-policy-binding gs://${BUCKET_NAME} \ + --member="serviceAccount:${SERVICE_ACCOUNT}@${PROJECT}.iam.gserviceaccount.com" \ + --role="roles/storage.objectCreator" +gcloud storage cp $path gs://$BUCKET_NAME/input/ |
