Frank.LaVigne
Frank.LaVigne

Reputation: 33

How to edit configuration settings in Azure Function for Azure Gov

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 

Upvotes: 2

Views: 586

Answers (1)

Saca
Saca

Reputation: 10662

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

Upvotes: 3

Related Questions