Helm upgrade and octopus action parameter

Hi guys,

i am trying to run the helm upgrade and trying to replace the values using Explicit Key Values

one of my key/value is like below

envSecretsValue.AM_STORAGE_CONNECTION_STRING = #{AM_STORAGE_CONNECTION_STRING}

in the variable section it is declared as AM_STORAGE_CONNECTION_STRING = $OctopusParameters[‘Octopus.Action[Common Resource Template].Output.AzureRmOutputs[AM_STORAGE_CONNECTION_STRING]’]

after running helm upgrade task if we check the value of envSecretsValue.AM_STORAGE_CONNECTION_STRING the value is “$OctopusParameters[‘Octopus.Action[Common Resource Template].Output.AzureRmOutputs[AM_STORAGE_CONNECTION_STRING]’]” seems like the substitution didn’t work

is there a way to get the value of ARM output variable as input of helm chart.

i tried powershell to print the #{AM_STORAGE_CONNECTION_STRING} and seems to be working

$test1 = #{AM_STORAGE_CONNECTION_STRING}
Write-Host "Test Variable " $test1

Octopus Server Version : v2019.13.7

Hi @sthomas,

Thanks for getting in touch! I appreciate the level of detail you’ve provided. From what I can see, it looks like it could be down to how you’ve defined the variable’s value. Instead of the PowerShell syntax to call this output variable (which works in your PowerShell script step), I think you would only need to swap it for the variable substitution syntax for this to work. i.e. variable AM_STORAGE_CONNECTION_STRING would have a value of #{Octopus.Action[Common Resource Template].Output.AzureRmOutputs[AM_STORAGE_CONNECTION_STRING]}

Does that get it working as intended? Let me know how you go or if you have any further questions going forward. :slight_smile:

Best regards,

Kenny

Hi Kenny,

Thanks for the update, its working as expected :slight_smile:

Thanks
Sanil

Hi Sanil,

Great to hear! Thanks for letting me know, and please don’t hesitate to reach out if you have any questions or concerns in the future. :slight_smile:

Best regards,

Kenny

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.