hardgcloud

Make all objects in a Cloud Storage bucket publicly readable

command

gcloud storage buckets add-iam-policy-binding gs://BUCKET --member allUsers --role roles/storage.objectViewer

also accepted

gcloud storage buckets add-iam-policy-binding

Command breakdown

Part of the Google Cloud CLI (gcloud) — Cloud Storage category.

gcloudstoragebucketsadd-iam-policy-bindinggs://BUCKET--memberallUsers--roleroles/storage.objectViewer
FlagPurpose
--memberBoolean flag
--roleBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →