0

In the Azure Functions local dev environment, I can generate a SAS token from the command line using

 az storage account keys list ...
 az storage account generate-sas ...

But then I have to cut and paste the generated SAS token into my local.settings.json each time.

Is there a way for the settings file to access the SAS token via e.g. an environment variable, or must I use a shell script/sed etc. to populate it each time I create a SAS token?

I suppose local.settings.json is just a dumb JSON file. So is host.json. So then I am really unsure - apart from the sed route - how to make such a SAS token or any other environment variable available directly to the Azure Functions local dev runtime. Perhaps there is a magic environment variable specifically for this purpose.

Thanks as ever

jtlz2
  • 7,700
  • 9
  • 64
  • 114

1 Answers1

0

You can use this method: func settings add -name "setting name" -value "XXXX" and inject your SAS token as value