Use Google Cloud Storage for object storage

Use Google Cloud Storage as the object store for your InfluxDB 3 Core instance.

Object store requirements

InfluxDB 3 Core depends on strict object store consistency semantics— strong read-after-write and list-after-write consistency, and conditional PUT (PUT-if-not-exists) support. Your Google Cloud Storage bucket must provide these semantics. See Object store requirements for the full list of semantics InfluxDB 3 Core depends on and how to verify your object store meets them.

Create a Cloud Storage bucket

  1. Sign in to the Google Cloud Storage console.
  2. Click Create bucket.
  3. Enter a bucket name–for example, influxdb3–and choose a location and storage class.
  4. Keep the default access control settings unless your organization requires otherwise, and click Create.

Alternatively, use the gcloud CLI to create a bucket:

gcloud storage buckets create gs://influxdb3 --project=
GOOGLE_CLOUD_PROJECT

Create a service account

Create a service account with permission to read from and write to your bucket, and download a JSON key for it:

  1. In the IAM & Admin console, create a new service account (or use an existing one).
  2. Grant the service account the Storage Object Admin (roles/storage.objectAdmin) role on your bucket.
  3. Under Keys, create a new JSON key and download it. Save the JSON key file–you provide its path to configure InfluxDB 3 Core.

In production, prefer workload identity federation over a downloaded JSON key where your deployment environment supports it.

Configure InfluxDB to connect to Google Cloud Storage

To use your Cloud Storage bucket as the object store for your InfluxDB 3 Core instance, provide the following options or environment variables with the influxdb3 serve command:

  • --node-id: Your InfluxDB 3 Core node ID (INFLUXDB_NODE_ID)
  • --object-store: google
  • --bucket: influxdb3
  • --google-service-account: Path to your service account JSON key file (/path/to/service-account.json)
influxdb3 serve \
  
--node-id 
INFLUXDB_NODE_ID
\
--object-store google \ --bucket influxdb3 \ --google-service-account
/path/to/service-account.json
  • INFLUXDB3_NODE_ID: Your InfluxDB 3 Core node ID (INFLUXDB_NODE_ID)
  • INFLUXDB3_OBJECT_STORE: google
  • INFLUXDB3_BUCKET: influxdb3
  • GOOGLE_SERVICE_ACCOUNT: Path to your service account JSON key file

export INFLUXDB3_NODE_ID=
INFLUXDB_NODE_ID
export INFLUXDB3_OBJECT_STORE=google export INFLUXDB3_BUCKET=influxdb3 export GOOGLE_SERVICE_ACCOUNT=
/path/to/service-account.json
influxdb3 serve

Confirm the object store is working

When InfluxDB 3 Core starts, it seeds your Cloud Storage bucket with the necessary directory structure and begins storing data there. Confirm the object store is functioning properly:

  1. View the influxdb3 serve log output to confirm that the server is running correctly.

  2. Inspect the contents of your bucket to confirm the necessary directory structure is created–for example, using the gcloud CLI:

    gcloud storage ls gs://influxdb3

Was this page helpful?

Thank you for your feedback!