Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 1.22 KB

functions-cli-get-storage-connection.md

File metadata and controls

22 lines (17 loc) · 1.22 KB
author ms.service ms.topic ms.date ms.author ms.custom
ggailey777
azure-functions
include
06/10/2022
glenga
devdivchpfy22

Retrieve the Azure Storage connection string

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.

  1. 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>
    
  2. Open local.settings.json file and locate the value named AzureWebJobsStorage, which is the Storage account connection string. You use the name AzureWebJobsStorage 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.