Articles on: Getting Started (Pentest)

Creating a service account in Google Cloud Platform (GCP)

Creating a service account in Google Cloud Platform (GCP) involves a few steps. Here's a clear guide:

Step 1: Sign in to Google Cloud Console



Go to GCP Console

Select your project or create a new one.

Step 2: Navigate to the IAM & Admin Section



In the left-hand menu, go to "IAM & Admin""Service Accounts".

Step 3: Create the Service Account



Click the "Create Service Account" button.

Fill in the following:

Name: A meaningful name (e.g., my-service-account).

ID: Auto-filled based on the name (can be customized).

Description: Optional but useful for clarity.

Click Create and Continue.

Step 4: Assign Roles



Choose the appropriate roles for the service account based on required permissions.For example:

Viewer (read-only access)

Editor (read/write access)

Owner (full control, use with caution)

Click Continue.

Step 5: Generate a Key



In the Service Accounts list, find your new account.

Click the three dots (︙) under "Actions" → Manage keys.

Click Add KeyCreate new key.

Select JSON as the key type.

Click Create — the JSON file will download automatically.

Store this JSON file securely. This file contains credentials required for authentication.

Step 6: Use the Service Account



Use the JSON key file when interacting with GCP services via SDKs, CLI tools, or deployment configurations.

Updated on: 02/04/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!