Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bdon opened this issue Sep 9, 2024 · 0 comments · Fixed by #3483

Comments

@bdon
Copy link
Contributor

bdon commented Sep 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant