How to replace config values with output from other steps

I have a step that generates the connection string value based on some input. This value is saved in a variable using:

Set-OctopusVariable -name “ConnectionString” -value “Data Source=…”

Later on I have a step that creates an Azure Web App with the Configuration Variables Feature enabled. I would expect variables to be set using Powershell to also be replaced, but this is not happening.

Am I doing something wrong is this is not supported?


Thanks for reaching out. How are you referencing the variable created by Set-OctopusVariable in the config file? You should do it following the format mentioned on the link below (referencing the name of the step where you created the variable in the variable name).

If that doesn’t help, please follow the below steps to send me deployment log, and also send your Azure webapp config file.

1) Add these 2 variables to your project

2) Create a new release (so the new variables take effect) and deploy it. If possible skip as many steps as you can and only leave step we are troubleshooting in order to avoid the noise in the log.

3) Send us the raw log of that deployment


Yeah I was expecting it to work with #{VariableName}. It’s fixed now, thanks!