Service Accounts in Google Cloud are special types of accounts, that belong to applications or VMs instead of
an end user. Following tutorial will show how to create service-accounts
with cloud-shell in GCP
.
gcloud config set project [Project-ID]
$DEVSHELL_PROJECT_ID
echo $DEVSHELL_PROJECT_ID
gcloud iam service-accounts create gcptutorials-sa --display-name "gcptutorials service account"
gcloud iam service-accounts list
storage.objectViewer
role to newly created service account
gcloud projects add-iam-policy-binding $DEVSHELL_PROJECT_ID \
--member serviceAccount:gcptutorials-sa@$DEVSHELL_PROJECT_ID.iam.gserviceaccount.com --role roles/storage.objectViewer
Category: GCP