Skip to content

Instantly share code, notes, and snippets.

@Qfl3x
Created June 24, 2022 10:20
Show Gist options
  • Save Qfl3x/38f2a95b83eda1a153f492af20f58621 to your computer and use it in GitHub Desktop.
Save Qfl3x/38f2a95b83eda1a153f492af20f58621 to your computer and use it in GitHub Desktop.

In order to add a new IAM service account to publish on PubSub and download its key, we must:

  1. Create a new IAM service account
  2. Give it PubSub Editor role

Creating a new IAM service account:

To create a new IAM service account, simply follow the instructions provided here: https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating

Giving it a PubSub Editor role:

To do that, simply navigate to your topic here: https://console.cloud.google.com/cloudpubsub/topic/, select it and add the PubSub Editor Permission to your service account. The PubSub Editor role is restrained to this Topic.

Download its key:

Follow the instructions: https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment