JSON object support in parameters to arm templates
I'm using json objects to pass things like subnet configurations, tags and nsg rules into a vnet template. When I add a artificat the GUI only supports string/integers as parameters. My suggestion is to make it possible to upload a complex parameter file in the same way as the template is added. That way I won't need to "dumb down" my parameter files and hard code things in my templates. I would then also have the option to use string parameters for simple templates and object for more complex ones when I add them to blueprints.
Martin - I'm going to close out this suggestion, because it is really two requests and one of them is done :) Can you please open up another suggestion specifically around uploading a parameters file in the assignments UI?
The UI for Blueprints now supports object as a parameter type and we will expect a JSON object to be passed into the UI. These can be complex, but the UI is a simple textbox, so we would recommend writing your object in a proper JSON editor and then pasting that object into the textbox. We do a good job of handling the whitespaces and new lines.
Martin D commented
Hi! Thanks for the response :)
It was mainly use case nr 1 that I was thinking of initially. Just being able to upload an entire parameter file (as is) in the "edit artifact" GUI in blueprint definitions. I use both json objects and arrays (for copy operations) so that's what I figured that I would need to use add my current templates to blueprints without a lot of re-work.
But I can also see the benefit of being able to just add a single json obect (or a single array) as a parameter value using a larger textbox perhaps. I noticed that the UI detects if the template parameter is an object or an array when hovering over the "i" icon. So that could be helpful extending that as well.
So yes, it could be seen as a two feature request. But I do think being able to upload and edit a parameter file would be most beneficial, in my case at least, initially. Then I could reallly pre-stage/configure environments.
Is it possible these are two separate feature requests? I'm reading this as two items:
1. Allow users to upload a single parameter file on assignment, which is a JSON file containing all parameters relevant to the assignment (just like ARM templates supports today)
2. Allow users to input an "object" as a parameter value in the UI (FWIW, the Blueprints API supports this). Similar to what is described here: https://docs.microsoft.com/en-us/azure/architecture/building-blocks/extending-templates/objects-as-parameters
Do I have this right?