volatilemolotov commented on code in PR #26859:
URL: https://github.com/apache/beam/pull/26859#discussion_r1206507650


##########
playground/infrastructure/cloudbuild/cloudbuild_playground_infra.sh:
##########
@@ -40,16 +40,31 @@ apt-get -qq install -y 
google-cloud-sdk-gke-gcloud-auth-plugin google-cloud-sdk
 git clone --branch $BRANCH_NAME $REPO_NAME --single-branch
 cd beam
 mkdir playground/terraform/environment/$ENVIRONMENT_NAME
- 
-gcloud storage buckets create gs://$TF_VAR_state_bucket --location 
$TF_VAR_region --project $TF_VAR_project_id --pap
-if [ $? -eq 0 ]
-then 
-        echo "Creation successfull"
+
+
+checkBucket=$(curl -s -H "X-Goog-User-Project: $(gcloud config get-value 
project)" -H "Authorization: Bearer $(gcloud auth print-access-token)" 
https://storage.googleapis.com/storage/v1/b/$TF_VAR_state_bucket -w 
"%{http_code}" -o /dev/null)

Review Comment:
   Added comment explaning that it checks for bucket, creates if missing



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to