AiStrike Documentation

Google Cloud

Onboard a Google Cloud Platform (GCP) environment to AiStrike using a service account and JSON key. Two options are supported: create the service account via Terraform, or via the GCP UI.

Option 1: Create service account using Terraform

Provide details through the AiStrike connector UI and execute the generated Terraform script using an organization-level GCP user account.

Prerequisites

  • gcloud CLI installed and configured.

  • Project ID — used by the Terraform script to create a service account (mandatory).

  • Organization ID — required only for whole-organization onboarding.

  • List of Project IDs — required only when onboarding multiple projects.

Onboarding methods

All three methods generate a Terraform script from the connector UI. Save it as onboarding.tf, then run the commands below.

Method 1 — Organization level: enter Configuration Name, Service Account Project ID, and Organization ID.

Method 2 — Single project: enter Configuration Name and Service Account Project ID, and set Scope to Projects.

Method 3 — Multiple projects: as Method 2, plus upload a .txt file listing project IDs separated by new lines.

For all methods, after saving onboarding.tf:

gcloud auth login
terraform init
terraform apply

On success, a <file_name>.json key file is created in the same directory. Upload it via the File Upload button in the connector UI, then click Save. A "Success" message confirms the configuration.

Option 2: Create service account via GCP UI

Prerequisites

The customer's GCP team needs admin permission to create a service account and assign roles:

  • Organization level:roles/iam.serviceAccountAdmin, roles/iam.organizationRoleAdmin, roles/iam.securityAdmin

  • Project level: Project Owner (roles/owner) on the target project

Find your Organization and Project IDs

In the GCP Console, click the project dropdown at the top of the page — your Organization ID and Project ID are listed there.

Create the service account

  1. In the GCP Console, go to IAM & Admin > Service Accounts.

  2. Click Create Service Account, enter a name like AIStrike_Service_Account, and click Create and Continue.

Assign required roles

Assign these roles at both the organization and project level: Viewer, Browser, Security Reviewer, Cloud Asset Viewer, Service Usage Viewer. (Add via IAM > Permissions if needed.)

Generate and download a JSON key

  1. Go to IAM & Admin > Service Accounts and open the service account you created.

  2. Open the Keys tab, click Add Key > Create New Key, select JSON, and click Create.

  3. The downloaded JSON key file is what you provide to AiStrike.

Configure the GCP connector

  1. Go to the AiStrike Integrations page.

  2. Click GCP - AiStrike Infra.

  3. Enter Configuration Name, Service Account Project ID, and Organization ID.

  4. Upload the service account key (JSON file).

  5. Click Save.