> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myrmex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Cloud Platform (GCP)

> Connect GCP to Myrmex — read project configuration on demand, audit cloud posture, and remediate findings.

import { Note, Steps, Step, CardGroup, Card, Tip } from '@mintlify/components';

Connect your **Google Cloud Platform (GCP)** project so Myrmex can read your resource configuration, audit your cloud security posture, and help you fix misconfigurations. Myrmex reaches the Google Cloud APIs through a [Collector](/documentation/agent-endpoint-security/collector-mode) using a least-privilege service account — everything is read in real time, on demand, and nothing from your project is stored on the Myrmex side.

## What Myrmex Can Do

<CardGroup cols={2}>
  <Card title="Read & inventory" icon="magnifying-glass">
    Enumerate projects and resources — Compute Engine, Cloud Storage, IAM, VPC, and more — for read-only analysis.
  </Card>

  <Card title="Cloud posture audit" icon="shield-halved">
    Run a [Security Posture](/documentation/security-posture/overview) audit against your project using CIS, ISO 27001, and NIST controls.
  </Card>

  <Card title="Find misconfigurations" icon="triangle-exclamation">
    Surface public buckets, over-permissive IAM bindings, open firewall rules, and unencrypted resources.
  </Card>

  <Card title="Guided remediation" icon="wrench">
    Get prioritized fixes and, on approval, apply changes to close the gaps.
  </Card>
</CardGroup>

## Before You Start

* A **Collector** deployed where it can reach the Google Cloud APIs over HTTPS. See [Deploying the agent](/documentation/agent-endpoint-security/installation).
* A **service account** with a JSON key and least-privilege roles — `Viewer` and `Security Reviewer` are enough for analysis; add narrowly scoped roles only for remediation.
* Your **project ID** and **project number**.

## Step 1 — Create the Credential in Google Cloud

<Steps>
  <Step title="Enable the required APIs">
    In the Google Cloud console, enable the **Cloud Resource Manager API** (and any service APIs you want Myrmex to read) for the project you're connecting.
  </Step>

  <Step title="Create a service account">
    In **IAM & Admin → Service Accounts**, create a dedicated service account for Myrmex.
  </Step>

  <Step title="Grant least-privilege roles">
    Assign `Viewer` and `Security Reviewer` for analysis. Add write-capable roles only when you want Myrmex to remediate.
  </Step>

  <Step title="Generate a JSON key">
    On the service account's **Keys** tab, add a key of type **JSON** and download it. You'll paste its contents into Myrmex.
  </Step>
</Steps>

<Tip>
  Keep the service account read-only for analysis and grant write roles only when you're ready for the agents to apply changes.
</Tip>

## Step 2 — Add the Integration in Myrmex

From the **Directory**, choose **Add Integration → Google Cloud Platform (GCP)**, then fill in:

| Field                    | Description                                                                                                   |
| ------------------------ | ------------------------------------------------------------------------------------------------------------- |
| **Project ID**           | The GCP project ID to connect.                                                                                |
| **Project Number**       | The project's numeric identifier.                                                                             |
| **Region**               | The default region for API calls.                                                                             |
| **Service Account JSON** | The full contents of the JSON key file created in Step 1. Stored securely and never exposed to the AI.        |
| **Collector**            | The [Collector](/documentation/agent-endpoint-security/collector-mode) that will reach the Google Cloud APIs. |

## Connect

Click **Connect** to validate the credentials and finish. The project then appears under **Environment → Integrations**, and you can start asking the AI about it in the Workspace.

<Note>
  Prefer least privilege: a `Viewer` + `Security Reviewer` service account covers analysis, and you can rotate the JSON key at any time.
</Note>
