Skip to content

Instantly share code, notes, and snippets.



Last active Aug 1, 2020
What would you like to do?
Create a Service Account
# Get the current project
PROJECT=$(gcloud config get-value core/project 2> /dev/null)
# Create a service account (aka robot account)
gcloud iam service-accounts create sa-name \
--description="sa-description" \
# Create and download credentials for the service account
gcloud iam service-accounts keys create creds.json \
--iam-account sa-name@$
# Copy service account email
echo "sa-name@$" | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment