easygcloud
Grant a service account the Pub/Sub Publisher role on a specific topic
command
gcloud pubsub topics add-iam-policy-binding order-events --member=serviceAccount:app-sa@my-project.iam.gserviceaccount.com --role=roles/pubsub.publishercommand
gcloud pubsub topics add-iam-policy-binding order-events --member=serviceAccount:app-sa@my-project.iam.gserviceaccount.com --role=roles/pubsub.publisherTest your recall — not just your reading.
Practice with interactive quiz →