Creating a Service Account in Google Cloud Platform (GCP)
Last updated: November 24, 2026
Automated Config Scans of Google Cloud use a service account with read-only access. This article explains how to create the service account, give it the Viewer role, create a JSON key, and upload it to Astra.
Before you start
Access to the Google Cloud console for the project you want reviewed.
Permission to create service accounts and grant roles in that project.
Create the service account
In the Google Cloud console, select the project.
Go to IAM & Admin > Service Accounts.
Click Create service account.
Enter a Service account name, for example
astra-config-scan. The Service account ID fills in automatically. Add a description if you like.Click Create and continue.
Give it the Viewer role
Under Grant this service account access to project, select the Viewer role.
Click Continue, and then Done.
Viewer is read-only, which is all a Config Scan needs. We recommend not granting Editor or Owner, because they allow changes to your project. To review more than one project, grant the same role on each project. For the role steps in more detail, read 📄 How-To: Adding a Viewer Role in GCP.
Create a JSON key
In the Service accounts list, open the actions menu (â‹®) for the new account and click Manage keys.
Click Add key > Create new key.
Select JSON and click Create. The key file downloads to your computer.
Store the key file securely. Anyone with the file can use the service account.
Upload the key in Astra
On the cloud target's Programmatic Access step, or later under the target's Settings. The step is headed Enter the credentials for programmatic access.
Upload the JSON key as the Credential File.
In Project Id(s), type each project ID to review and press Enter after each one.
Click Test Connection to confirm that Astra can connect.

The Programmatic Access step of a GCP cloud target. Upload the service account JSON key and add the project IDs to review.
For the full setup, read 📄 Cloud Target Setup.
If you need help creating the service account, contact support from your Astra dashboard or reach out to your CSM.