How can we improve the Azure Resource Manager?

Optional parameters in ARM templates

It would be great if we could define some ARM template parameters as optional or not required.

36 votes
Sign in
(thinking…)
Sign in with: Microsoft
Signed in as (Sign out)

We’ll send you updates on this idea

Nuno Centeno shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

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:

“defaultValue”: ""

If you have scenarios where this isn’t working for you feel free to email…

5 comments

Sign in
(thinking…)
Sign in with: Microsoft
Signed in as (Sign out)
Submitting...
  • John Kendall commented  ·   ·  Flag as inappropriate

    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.

  • Henry commented  ·   ·  Flag as inappropriate

    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.

    +1

Feedback and Knowledge Base