Optional parameters in ARM templates
It would be great if we could define some ARM template parameters as optional or not required.
You can make it optional to provide a value for a param, by using a defaultValue and in some cases, just make the value “empty”. For example:
If you have scenarios where this isn’t working for you feel free to email…
John Kendall commented
This is a problem for Service Bus Topic Subscriptions. the forwardTo field is optional however if you were to enter a null or "", an error is returned.
A Default Value might be usable in some cases, however I've hit a point where I need to only set ConnectionString values for the WebApp if the Parameter is set. Leaving the Parameters blank breaks the deployment saying that the values can not be empty, however if the section is taken out of the template the deployment works and the values aren't attempted to be set in the portal.
Ben Virkler commented
Can't you do this by providing a default value?
Hi, yes, this could be really usefull