OctopusDeploy / Library

| Public | A repository of step templates and other community-contributed extensions to Octopus Deploy
Other
171 stars 504 forks source link

Azure Function - Set AppSettings from Azure AppConfig - bug fix #1454

Closed harrisonmeister closed 1 year ago

harrisonmeister commented 1 year ago

Background

Bug fix for the step Azure Function - Set AppSettings from Azure AppConfig

Results

Before

Previously with the step, there was a bug whereby if you set the parameters to retrieve from Azure App Config like so:

MyValue | MyDifferentNamedValue
MyValue2 | MyDifferentNamedValue2

The resulting azure function would correctly set the app settings with name:

But with a null/empty value.

The cause was this line was missing:

 $matchingAppConfigKey = $matchingAppConfigKeys | Select-Object -First 1

After

Given the parameters

MyValue | MyDifferentNamedValue
MyValue2 | MyDifferentNamedValue2

Assuming each value stored in Azure App Config was blah the results would be stored in the App Functions app settings like sp:

Pre-requisites

Fixes # . If there is an open issue that this PR fixes add it here, otherwise just remove this line