OctopusDeploy / Library

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

Add Azure Function - Set AppSettings from Azure AppConfig #1452

Closed harrisonmeister closed 1 year ago

harrisonmeister commented 1 year ago

Background

Similar to #1451, there is no native way in Octopus to retrieve configuration values from an Azure App Configuration Store and to publish them to an Azure App function subsequently

Results

This step retrieves one or more key/values from an Azure App Configuration store and adds them to an Azure App Function's AppSettings.

You can retrieve individual keys that match a specific name, and you can choose a custom setting name for each key.

Wildcard search is also supported using the * notation in the Key Names parameter. Note: Combining a wildcard search with custom output variable names is not supported.

You can also combine retrieved values with additional parameters passed into the step using the Additional AppSettings parameter.

Authentication is performed using an Azure Service Principal.


Required:

Notes:

Before

N/A

After

Step template in a runbook process:

image

Results in Task log:

image

Verbose logs:

image

Pre-requisites

harrisonmeister commented 1 year ago

Small style suggestions, and one potential bug where an empty string is checked by comparing it to $null.

Thanks @mcasperson - these should be resolved in a64d8ff

Side note: I use more brackets in a ton of places :smile: