2

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 
Janusz Nowak
  • 2,595
  • 1
  • 17
  • 36

1 Answers1

3

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
Saca
  • 10,355
  • 1
  • 34
  • 47