# gcp_cloud_storage

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [connect-full.txt](https://docs.redpanda.com/connect-full.txt)

---
title: gcp_cloud_storage
latest-connect-version: 4.93.0
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-redpanda-tag: v26.1.9
docname: inputs/gcp_cloud_storage
page-component-name: connect
page-version: master
page-component-version: master
page-component-title: Connect
page-relative-src-path: inputs/gcp_cloud_storage.adoc
page-edit-url: https://github.com/redpanda-data/rp-connect-docs/edit/main/modules/components/pages/inputs/gcp_cloud_storage.adoc
page-git-created-date: "2024-05-24"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/connect/components/inputs/gcp_cloud_storage.md -->

**Type:** Input ▼

[Input](https://docs.redpanda.com/connect/components/inputs/gcp_cloud_storage/)[Cache](https://docs.redpanda.com/connect/components/caches/gcp_cloud_storage/)[Output](https://docs.redpanda.com/connect/components/outputs/gcp_cloud_storage/)

**Available in:** [Cloud](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/inputs/gcp_cloud_storage/%20%22View%20the%20Cloud%20version%20of%20this%20component%22), Self-Managed

Downloads objects within a Google Cloud Storage bucket, optionally filtered by a prefix.

Introduced in version 3.43.0.

#### Common

```yml
inputs:
  label: ""
  gcp_cloud_storage:
    bucket: "" # No default (required)
    prefix: ""
    credentials_json: ""
    scanner:
      to_the_end: {}
```

#### Advanced

```yml
inputs:
  label: ""
  gcp_cloud_storage:
    bucket: "" # No default (required)
    prefix: ""
    credentials_json: ""
    scanner:
      to_the_end: {}
    delete_objects: false
```

## [](#metadata)Metadata

This input adds the following metadata fields to each message:

```none
- gcs_key
- gcs_bucket
- gcs_last_modified
- gcs_last_modified_unix
- gcs_content_type
- gcs_content_encoding
- All user defined metadata
```

You can access these metadata fields using [function interpolation](https://docs.redpanda.com/connect/configuration/interpolation/#bloblang-queries).

### [](#credentials)Credentials

By default Redpanda Connect will use a shared credentials file when connecting to GCP services. You can find out more in [Google Cloud Platform](https://docs.redpanda.com/connect/guides/cloud/gcp/).

## [](#fields)Fields

### [](#bucket)`bucket`

The name of the bucket from which to download objects.

**Type**: `string`

### [](#credentials_json)`credentials_json`

Base64-encoded Google Service Account credentials in JSON format (optional). Use this field to authenticate with Google Cloud services. For more information about creating service account credentials, see [Google’s service account documentation](https://developers.google.com/workspace/guides/create-credentials#create_credentials_for_a_service_account).

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Secrets](https://docs.redpanda.com/connect/configuration/secrets/).

**Type**: `string`

**Default**: `""`

### [](#delete_objects)`delete_objects`

Whether to delete downloaded objects from the bucket once they are processed.

**Type**: `bool`

**Default**: `false`

### [](#prefix)`prefix`

Optional path prefix, if set only objects with the prefix are consumed.

**Type**: `string`

**Default**: `""`

### [](#scanner)`scanner`

The [scanner](https://docs.redpanda.com/connect/components/scanners/about/) by which the stream of bytes consumed will be broken out into individual messages. Scanners are useful for processing large sources of data without holding the entirety of it within memory. For example, the `csv` scanner allows you to process individual CSV rows without loading the entire CSV file in memory at once.

Requires version 4.25.0 or later.

**Type**: `scanner`

**Default**:

```yaml
to_the_end: {}
```