nestjs / azure-storage

Azure Storage module for Nest framework (node.js) ☁️

Home Page:https://nestjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support to instanciate Azure Storage Client via connection string

cmaneu opened this issue · comments

I'm submitting a...


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

This lib only supports storage account name and storage account SAS Key, either through configuration, or through additional storage options in the interceptor declaration.

Expected behavior

We should be able to precise either an account name/storage account pair OR a connection string.

Minimal reproduction of the problem with instructions

Irrelevant :)

What is the motivation / use case for changing the behavior?

Having a connection string support will enable the following scenarios :

  • Support for Local Azure Storage Emulator (a must-do for developers)
  • Support for other storage emulators, like Azurite, used in integration testing via CD/CI pipelines
  • Support for non-global+public Azure Instance (Azure Gov, Azure Germany, Azure China, ...)

Environment


Nest version: 6.6.4

 
For Tooling issues:
- Node version: 10.16.1  
- Platform: Linux  

Others:

There is a few things to change in the code. For example in line azure-storage.service.ts:58 the core Azure Storage URI is embedded in the code. However, for local emulator there is no DNS resolution. Account name ends up being part of the URI (https://localhost:10000/<accountName>/<containerName>/....).

Is there any progress on this feature request? Library is basically unusable, when we can not connect dev environment to local emulator.

We are working on this @wiekonek. I will keep you posted.

How are you doing with the upgrades? If you need any help, please let me know :)

commented

Any update on this?