In order to add a new IAM service account to publish on PubSub and download its key, we must:
- Create a new IAM service account
- Give it PubSub Editor role
To create a new IAM service account, simply follow the instructions provided here: https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating
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.
Follow the instructions: https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating