Skip to main content
Version: v1.40.0

Google Cloud Storage

Overview​

Retrieves the configuration from a Google Cloud Storage bucket. This retriever is useful when you are using Google Cloud and want to use GCS to store your configuration files.

The Google Cloud Storage Retriever will use the google-cloud-storage package and google-api-options package to access your flag in Google Cloud Storage.

Configure the relay proxy​

To configure your relay proxy to use the Google Cloud Storage retriever, you need to add the following configuration to your relay proxy configuration file:

goff-proxy.yaml
# ...
retrievers:
- kind: googleStorage
bucket: 2093u4pkasjc3
object: flags.yaml
# ...
Field nameMandatoryTypeDefaultDescription
kindstringnoneValue should be googleStorage.
This field is mandatory and describes which retriever you are using.
bucketstringnoneThis is the name of your Google Storage bucket (ex: my-featureflag-bucket).
objectstringnonePath to the file inside the bucket (ex: config/flag/my-flags.yaml).
info

If you want to authenticate with Google Cloud, you can use the default environment variable GOOGLE_APPLICATION_CREDENTIALS to provide your credentials. We recommend using GCP native authentication methods.

Check this documentation for more info.

Configure the GO Module​

To configure your GO module to use the Google Cloud Storage retriever, you need to add the following configuration to your ffclient.Config{} object:

example.go
err := ffclient.Init(ffclient.Config{
PollingInterval: 3 * time.Second,
Retriever: &gcstorageretriever.Retriever{
Options: []option.ClientOption{option.WithoutAuthentication()},
Bucket: "2093u4pkasjc3",
Object: "flags.yaml",
}
})
defer ffclient.Close()
FieldMandatoryDescription
BucketThe name of your bucket.
ObjectThe name of your object in your bucket.
OptionAn instance of option.ClientOption that configures your access to Google Cloud.
Check this documentation for more info.