Docs / Contact / connectors/gcp-storage
Google Cloud Storage
Provider:gcp| Service:storage| Direction: Write
Google Cloud Storage connector for writing (uploading) objects to a GCS bucket.
Required Permissions
The service account must have:
| Operation | Required Permission | Predefined Role |
|---|---|---|
| Write object | storage.objects.create |
Storage Object Creator |
Tip: Grant the role at the bucket level for least privilege.
Operation
When a message reaches this connector, it writes an object to the configured bucket. The payload must supply:
| Payload field | Required | Description |
|---|---|---|
path |
Yes | Object name/path within the bucket |
content |
Yes | Object content to upload |
Connector Configuration
The connector is created with type: "cloud", provider: "gcp", service_type: "storage", plus:
Field (config) |
Required | Description |
|---|---|---|
auth_type |
No | api_key (default) or role. See below. |
project_id |
Yes | Google Cloud project ID |
bucket_name |
Yes | Cloud Storage bucket name |
credentials |
Conditional | Service account JSON credentials (use ${secrets.gcp_credentials}). Provide for api_key auth. |
Role-based authentication
Set auth_type: "role" to use Application Default Credentials (ADC) from the environment Contact runs in. No service account JSON is needed.
Output
json
{
"status": "completed",
"data": {
"status": "uploaded",
"path": "events/abc123.json"
}
}
Example
Connector config (service account):
json
{
"type": "cloud",
"provider": "gcp",
"service_type": "storage",
"project_id": "my-gcp-project",
"bucket_name": "my-data-bucket",
"credentials": "${secrets.gcp_credentials}"
}
Connector config (ADC / role):
json
{
"type": "cloud",
"provider": "gcp",
"service_type": "storage",
"auth_type": "role",
"project_id": "my-gcp-project",
"bucket_name": "my-data-bucket"
}
Tendrl