Skip to content

Azure Blob Storage ​

Overview ​

Retrieves the configuration from an Azure Blob Storage. This retriever is useful when you are using Azure and want to use Azure Blob Storage to store your configuration files.

Configure the relay proxy ​

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

yaml
# ...
retrievers:
  - kind: azureBlobStorage
    container: my-featureflag-container
    accountName: my-featureflag-account
    object: flag/flags.yaml
# ...
Field nameMandatoryTypeDefaultDescription
kindYesstringnoneValue should be azureBlobStorage.
This field is mandatory and describes which retriever you are using.
containerYesstringnoneThis is the name of your Azure Blob Storage container (ex: my-featureflag-container).
accountNameYesstringnoneThis is the name of your Azure Blob Storage account.
objectYesstringnoneLocation of your configuration file.
accountKeyNostringnoneThis is the secret key of your Azure Blob Storage account.

Configure the GO Module ​

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

go
client, err := ffclient.New(&ffclient.Config{
    PollingInterval: 3 * time.Second,
    Retriever: &azblobstorageretriever.Retriever{
        Container:    "your-container",
        AccountName:  "your-account-name",
        AccountKey:   "your-account-key",
        Object:       "your_location/feature-flags.json",
    },
})
defer client.Close()
FieldMandatoryDescription
ContainerYesName of the Azure Blob Storage container
ObjectYesName of the feature flag file in the container
AccountNameYesAzure Storage Account Name
AccountKeyNoStorage Account Key
ServiceURLNoCustom service URL

Error Handling ​

The Retrieve method returns an error if:

  • AccountName is empty
  • Container or Object is not specified
  • There's an issue initializing the Azure client.
  • There's a problem downloading or reading the file from Azure Blob Storage.

Released under the MIT License.