Service accounts

In general, it's best practice to use service accounts whenever possible. Let's get started with this by creating a service account and providing it with some resource-specific roles:

  1. To create a service account, go to the Service accounts section in IAM and click on Create Service Account.
  2. From here, provide a name and select any roles the service account will need. The name should be meaningful, generally including how it will be used.
  3. For this example, let's suppose the service account will be used by an inventory management service called inventory-manager, and that it will need to accept messages from Pub/Sub and update related records in a Cloud SQL instance.
  4. For this service, we likely want to name the service account ...

Get Building Google Cloud Platform Solutions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.