Add process step to read data from DB and based on deployment environment find machines id’s and create output variable for each machine (This of this as producer running on Octopus Server)
Add process to consume output data generated in Step #1 and run it on deployment servers.
If I hard code machine id like “Octopus.Action[Producer].Output.Machines-277” I do see value. But I want to bind “Machines-277” dynamically based on where deployment is happening.
The correct value was output for me when using the syntax above. I believe the issue stemmed from the variable $machineId being inside quotes. In PowerShell, a variable inside quotes needs to be referenced like the above.
Please let me know if this works for you or if you need more help with it.