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:
- To create a service account, go to the Service accounts section in IAM and click on Create Service Account.
- 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.
- 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.
- For this service, we likely want to name the service account ...