How to edit configuration settings in Azure Function for Azure Gov

582 Views Asked by At

I'd like to use code like this in my Azure Function:

var key = ConfigurationManager.AppSettings["SubscriptionKey"];

Given that there's no UI for Azure Functions in the Azure Government portal yet, is there a way to add this via the Azure CLI or is there another way to make this happen?

Update

I figured it out:

az functionapp config appsettings set --name appname --settings SubscriptionKey=1234 --resource-group resourcegroupname 
1

There are 1 best solutions below

0
On

As you've already found out, you can do this via Azure CLI with the following command:

az functionapp config appsettings set --name appname --settings SubscriptionKey=1234 --resource-group resourcegroupname