← Pub/Sub518 / 640
hardgcloud

Allow anyone to publish messages to a Pub/Sub topic without authentication

command

gcloud pubsub topics add-iam-policy-binding TOPIC --member allUsers --role roles/pubsub.publisher

also accepted

gcloud pubsub topics add-iam-policy-binding

Command breakdown

Part of the Google Cloud CLI (gcloud) — Pub/Sub category.

gcloudpubsubtopicsadd-iam-policy-bindingTOPIC--memberallUsers--roleroles/pubsub.publisher
FlagPurpose
--memberBoolean flag
--roleBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →