DEV Community

Shahriyar Al Mustakim Mitul
Shahriyar Al Mustakim Mitul

Posted on

3

Create a service account in the Google Cloud Platform using the command line:

Use this command to create the service account:

gcloud iam service-accounts create test-service-account2 --display-name "test-service-account2"
Enter fullscreen mode Exit fullscreen mode

Note: If you see the following output, type y and press ENTER

Image description

Now if you go to the Navigation bar and then IAM & Admin and then Service accounts, you can see out service account:

Image description

Also we can give it a role using command line. For example, lets give this service account the project viewer role:

gcloud projects add-iam-policy-binding $GOOGLE_CLOUD_PROJECT --member serviceAccount:test-service-account2@${GOOGLE_CLOUD_PROJECT}.iam.gserviceaccount.com --role roles/viewer
Enter fullscreen mode Exit fullscreen mode

Image description

Done!

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs