author | ms.service | ms.topic | ms.date | ms.author | ms.custom |
---|---|---|---|---|---|
ggailey777 |
azure-functions |
include |
06/10/2022 |
glenga |
devdivchpfy22 |
Earlier, you created an Azure Storage account for function app's use. The connection string for this account is stored securely in app settings in Azure. By downloading the setting into the local.settings.json file, you can use the connection to write to a Storage queue in the same account when running the function locally.
-
From the root of the project, run the following command, replace
<APP_NAME>
with the name of your function app from the previous step. This command overwrites any existing values in the file.func azure functionapp fetch-app-settings <APP_NAME>
-
Open local.settings.json file and locate the value named
AzureWebJobsStorage
, which is the Storage account connection string. You use the nameAzureWebJobsStorage
and the connection string in other sections of this article.
Important
Because the local.settings.json file contains secrets downloaded from Azure, always exclude this file from source control. The .gitignore file created with a local functions project excludes the file by default.