Giving Azure VM’s Environmental Variables through ARM templates.

My Problem

I’m building a one-click deployment arm template for UiPath’s Orchestrator. As part of this I’m trying to pass connection information into my VM through the environmental variables. I’ve only found a way to pass one environment variable in at a time. The example found here falls apart as soon as you start running multiple commands

My Solution

This solution doesn’t meet my expectations but my hand is being forced unless I can find a better way. Since I’ve got a reliable way to get one string value into my environment, I’ve taken to cramming everything I need into that one variable and parsing it out. It’s working for now, but for my use-case I really only need 3 values. If my requirements were any larger I’d be wrestling with a real beast.

More Info

I’m running into this problem because as part of the installation of UiPath’s Orchestrator, I need to connect it with a database. I’ve opted to use the azure sql server and need to use values that are determined during deployment. It seems to me that the Custom Script Extension is just what I need, minus this shortfall. This is all being done so that within my organization whenever someone needs an instance of Orchestrator we’ve got everything set up and ready to go. Right now it’s ~10 minutes from the start of the deployment to having a working instance. Hopefully shorter if I can transition from having to remote into the server and run a script to that script being run automatically.

Leave a comment