Azure ARM deployment, passing dynamic variables from powershell

Question:

I have created an ARM template to deploy a service with a set of application settings.
One of my parameters in the ARM template does not have a default value.
At present, when I run the deployment script using ISE I am asked “Supply values for the following parameters:” (a request for human input).

This is fine but this script will be automated. How do I pipe this dynamic variable into this field?

ARM:

The deployment powershell is boiler plate.

Answer:

There are several ways to do that, easiest one is this:

another one (which is cooler) is to create a hash table with the values of parameters you have and splat it against the cmdlet:

Another way is to preprocess the json parameters file and pass it to the deployment

Source:

Azure ARM deployment, passing dynamic variables from powershell by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply