Configure a snapshot repository using GCS

To configure a custom repository using your GCS account, create the bucket with your custom GCS account. Make sure the bucket is in the same region as your cluster.

Configure the keystore

Create an entry for the GCS client in the Elasticsearch keystore:

  1. Log in to the Elasticsearch Add-On for Heroku console.
  2. Create a deployment with an Elasticsearch cluster that has the repository-gcs plugin enabled.
  3. From your deployment menu, go to the Security page, then click Create settings to create an Elasticsearch keystore entry.
  4. Enter as Setting name gcs.client.default.credentials_file, click JSON block / file and specify the options.

    For more information on how to get the JSON account service key, see Using a Service Account.

  5. Click Save.

Create the repository

With the bucket ready, you can create a repository by PUT-ing the following to /_snapshot/repository_name:

  "type": "gcs",
  "settings": {
    "bucket": "name-of-bucket",
    "region": "region-of-bucket-same-as-cluster",
    "access_key": "YOURKEYHERE",
    "secret_key": "secret-key-with-just-permission-to-that-bucket-do-not-use-a-master-key",
    "compress": true