Most of the undefined variables could be identified before the deployment even starts to execute, although file substitutions might have to be validated as part of the specific deployment step.

For context, I've been troubleshooting an issue with a deployment that appears to be creating incorrect tags in an Azure Resource Manager deployment. When I look in the Azure portal, the resource created by the deployment has a tag called "MyTag" with the literal value "#{MyTag}".

From a quick investigation, it looks like my Octopus Deploy Project doesn't have a variable called "MyTag", so the file substitution on the ARM Template is failing to replace the literal "#{MyTag}" text with the value of a variable. I can obviously fix this by adding a "MyTag" variable to my specific Project, but it doesn't help with the general problem of identifying when variables are undefined in a deployment.

The best way to get this implemented is to add your support to the UserVoice issue.

We are currently working on a variable simulator that will get some of the way towards achieving this. You will be able to view evaluated variable values for a particular scope, which will highlight any missing variables in steps and nested references.

Actually, just to follow up, will the Variable Simulator you mentioned be available through the API? It sounds like a useful feature in itself even if it's UI-only, but it'd have a lot more value if I could automate against it using PowerShell.