> For the complete documentation index, see [llms.txt](https://docs.firefly.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.firefly.ai/integrations/iac-remote-state/google-cloud-storage.md).

# Google Cloud Storage

Firefly integrates with Google Cloud Storage to pull in Terraform state files. This integration allows Firefly to analyze your Terraform state files stored in Google Cloud Storage buckets, providing comprehensive visibility into your infrastructure resources managed through Terraform.

## Prerequisites

* A Google Cloud Platform account.
* A service account with appropriate permissions to access the storage buckets containing Terraform state files.

## Integrating a new account

1. Log into your Google Cloud service account, and click **Create Service Account**.
2. Add the Service account details, and click **Create and Continue**.
3. Add the following role:
   * `storage.objectViewer` conditional to tfstate suffix.
4. Click **Save > Done**.
5. Click the kebab menu.
6. Click **Manage keys > Add Key > Create new key**.
7. To download a service account key file, click **JSON > Create**.
8. In Firefly, click **Settings > Integrations**.
9. Click **Add New > Google Cloud Storage**.
10. Enter a **Nickname** and **Project ID**.
11. Paste or upload the account key file into the **Service Account Key** field.
12. Click **Next**.
13. Click **Done**.

## Integrating an existing account

1. Log in to your Google Cloud service account.
2. Add the following roles to the account you want to integrate:
   * `storage.objectViewer` conditional to tfstate suffix.
3. Click the kebab menu.
4. Click **Manage keys > Add Key > Create new key**.
5. To download a service account key file, click **JSON > Create**.
6. In Firefly, click **Settings > Integrations**.
7. Click **Add New > Google Cloud Storage**.
8. Enter a **Nickname** and **Project ID**.
9. Paste or upload the account key file into the **Service Account Key** field.
10. Click **Next**.
11. Click **Done**.

## Configuration Details

* Firefly scans your Google Cloud Storage buckets by default every 4 hours.
* Your Google Cloud Storage buckets state files list will stay updated automatically.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.firefly.ai/integrations/iac-remote-state/google-cloud-storage.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
