July 2018
Intermediate to advanced
506 pages
16h 2m
English
Let's go ahead and create our first bucket using gsutil. Because all bucket names must be unique in a global namespace, we need to first generate a bucket name that doesn't exist in any other project. As we covered earlier, for complex systems that generate many bucket names, a preferred mechanism is to incorporate a random component into the bucket's name. For our purposes, a small amount of randomization should suffice.
When interacting with Cloud Storage from most tools, the protocol prefix gs:// is used to denote that a given path resides in Cloud Storage. From within the Cloud Shell, execute the following command to generate a unique bucket name:
export BUCKET_NAME=gs://hello-cloud-storage-$RANDOM
With a unique ...