Skip to content

blob/azblob: Azure Service Connector uses a different environment variable for connection strings #3482

@bdon

Description

@bdon

Is your feature request related to a problem? Please describe.

For Azure Service Connector, the default connection string environment variable is named AZURE_STORAGEBLOB_CONNECTIONSTRING (see docs)

However, the azblob module reads the AZURE_STORAGE_CONNECTION_STRING environment variable:

connectionString := os.Getenv("AZURE_STORAGE_CONNECTION_STRING")

Describe the solution you'd like

In order for gocloud to work "out of the box" using Service Connector it needs to read from this additional environment variable. Check AZURE_STORAGE_CONNECTION_STRING first, and then check AZURE_STORAGEBLOB_CONNECTIONSTRING.

Describe alternatives you've considered

  • ask Azure to make this environment variable consistent?
  • In my program that uses azblob check for env var AZURE_STORAGEBLOB_CONNECTIONSTRING, and if present set AZURE_STORAGE_CONNECTION_STRING

Additional Context

previous relevant PR: #3072

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions