DriftOps polls a Google Cloud Storage bucket on a schedule. New objects matching your file pattern are downloaded, compared against the linked contract, and drift events are created for any differences.
Prerequisites
- A Google Cloud project with a GCS bucket containing the files to monitor
- A service account with
Storage Object ViewerandStorage Legacy Bucket Readerroles on the bucket - The service account JSON key file
Create the connection
- Go to Cloud Connections and click New Connection.
- Select Google Cloud Storage as the provider.
- Fill in the form:
- Name: a label for this connection
- Project ID: your GCP project ID (e.g.
my-project-123) - Service Account JSON: paste the full contents of the service account key JSON file
- Bucket Name: the GCS bucket name
- Prefix (optional): object prefix to scope the watch, e.g.
data/incoming/ - File Pattern: glob pattern, e.g.
*.json - Contract: the contract to compare against
- Poll Interval: how often to check (minutes, default 60)
- Click Save.
The service account JSON is encrypted before storage. The raw key is never returned by the API.
Service account setup
In the Google Cloud Console:
- Go to IAM and Admin > Service Accounts.
- Click Create Service Account.
- Give it a name (e.g.
driftops-reader). - Grant the following roles on the specific bucket (not project-wide if you want least privilege):
Storage Object Viewer(roles/storage.objectViewer)Storage Legacy Bucket Reader(roles/storage.legacyBucketReader)
- Click Done.
- Open the service account, go to Keys, and click Add Key > Create new key > JSON.
- Download the JSON file and paste its contents into the DriftOps connection form.
DriftOps only reads objects. It does not write to or delete from your bucket.
Configuration options
Only process objects under this path.
Glob pattern matched against object names.
*.jsonHow often to check for new objects.
Troubleshooting
Permission denied listing objects
The service account needs Storage Legacy Bucket Reader to list objects. Storage Object Viewer alone is not sufficient for listing.
Service account JSON rejected
Paste the entire JSON including the outer braces. The format starts with {"type": "service_account", ...}. Do not strip whitespace or newlines.
No files found
- Check the prefix. GCS object paths are case-sensitive.
- The file pattern is matched against the object name only, not the full path. If your objects are at
data/orders/order_001.json, the pattern*.jsonwill matchorder_001.json.