Gcs Datastore
Store data in a Google Cloud Storage bucket with local cache synchronization. Provides distributed locking via GCS generation-based preconditions and bidirectional sync between a local cache directory and GCS. Features per-path dirty tracking, SHA-256 content hashing, partitioned index for scoped sync, namespace-scoped sync for multi-repo shared datastores, and configurable transfer concurrency.
Authentication
Uses Google Cloud Application Default Credentials (ADC) — no credentials in config. Provide credentials via one of:
- Environment variable:
GOOGLE_APPLICATION_CREDENTIALSpointing to a service account key JSON file - User credentials:
gcloud auth application-default login - Attached service account on GCE, Cloud Run, or GKE
Required IAM Permissions
storage.buckets.getstorage.objects.createstorage.objects.getstorage.objects.deletestorage.objects.list
The predefined role roles/storage.objectAdmin covers all of these.
Usage
swamp datastore setup @swamp/gcs-datastore \
--config '{"bucket": "my-bucket", "prefix": "swamp"}' --jsonStore data in a Google Cloud Storage bucket with local cache synchronization.
Config Fields
| Field | Type | Description |
|---|---|---|
| bucket | string | GCS bucket name |
| prefix? | string | Object name prefix within the bucket |
| projectId? | string | GCP project ID (defaults to ADC project) |
| apiEndpoint? | string | Custom API endpoint URL (for emulators like fake-gcs-server) |
| pullConcurrency? | number | Maximum concurrent GCS downloads during pull. Default: 50 |
| pushConcurrency? | number | Maximum concurrent GCS uploads during push. Default: 25 |
Modified 1 datastores
Not yet scored.
A score will be generated the next time this extension is published. The owner can also trigger scoring manually.