I’m trying to pass variables from an ARM template output step to a powershell step, but the PowerShell thinks the template value is empty, so the powershell fails.
Thanks for reaching out. I’m afraid that catching the output of an ARM template like that is not possible at the moment. Feel free to add it as a uservoice suggestion to see if the community would find this enhancement useful: http://octopusdeploy.uservoice.com/
Accessing ARM template output parameters
Any outputs from the ARM template step are made available as Octopus output-variables automatically. For example, an output Foo would be available as:
Sincere apologies for the delay on this. I’ve just setup a test and the output variables do get handled and passed in to subsequent step correctly.
To troubleshoot why it might not be working for you, could I get you to check the output from the Resource Group step? There should be a line right near the end that reads “Provisioning State: Succeeded”. If you view the Verbose output then just below this should be the json for the template output. Does that appear and does it have the correct values substituted in?
If you have a variable in the project called OctopusPrintVariables that is set to True, then in the Verbose output for the second step you should be able to see the variable values being passed in. To find the one I’m after I typically expand any “additional lines not shown” sections and then text search the page for the variable name, e.g. WebSiteResourceId in your scenario. Can you find the variable in the list and if so is it’s value correct? If it is there and correct, could you also double check that the full name being passed in is Octopus.Action[deploy-web-app].Output.AzureRMOutputs[WebSiteResourceId]?