Config/File variable substitution using task output variables?

Is it possible to substitute output variables from a powershell tasks within config transforms? For example:
In one task, I’m getting a connection string from an azure powershell script and on a deploy task I am wanting to transform the config to substitute the output variable from the azure task.

My config file looks like this:

I can notice that all variable substitutions happen fine before this, but on or after this variable instance it doesn’t substitute which makes me believe my syntax is incorrect. (However, this is the same variable syntax that can be used in subsequent powershell scripts.

Am I missing something here? Alternatively, is there any way I could update the tenant variable so I don’t have the rely on output variables or possibly running the azure powershell script every deployment.

found out the answer myself. Turned on variable output logging to see how to correctly supply the variable using the config transform:

in the case above, the following variable was needed:

<add key="InstanceServiceBusConnectionString" value="#{Octopus.Action[GetServiceBusConnectionString].Output.ServiceBusConnectionString}" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>

Hi Sean - That’s exactly right :). I’m glad to hear the variable logging helped you figure this one by yourself.

Cheers!