I've followed the instructions to download and install Azurite for Linux (Ubuntu 18.04). I want to use it with Azure Storage Explorer (also downloaded and installed) to visually manage/test an Azure Function with BlobTrigger. I understand how to start Azurite and can upload blobs to an emulator container using Storage Exporer.
Cannot figure out:
How to connect an Azure Function to an Azurite container to use as the Functions internal storage.
a. I used
"AzureWebJobsStorage": "UseDevelopmentStorage=true"
inlocal.settings.json
, but I don't see how that connects the Function to a given container in AzuriteHow to connect the Function to an Azurite container for BlobTrigger functionality.
a. Do I need to add a
"BlobTrigger": "<azuriteContainerConnectionString>"
setting tolocal.settings.json
?
Basically, The Values in local.settings.json is been used to save the environment variable.
The connection string is been declared in function.json. If you are using some language like C# or Java(Languages that need to be compiled, not run directly.), then it always have a declaration part, the declaration part will be convent to function.json after compiled.
I start a Azurite on local, and I try to use the default storage account:
I get the default connection string of blob service:
And I create a C# azure function with blobtrigger:
local.settings.json
Function1.cs
It seems works fine:
I set
AzureWebJobsStorage
to a storage on azure because 10000 port is been used.This is the doc: