farmer icon indicating copy to clipboard operation
farmer copied to clipboard

Add a toggle to generate a template with parameters

Open panesofglass opened this issue 4 years ago • 3 comments

I have a need to generate an ARM template that provides a parameters file that could be replaced for multiple deployments in different subscriptions, resource groups, etc. From a previous discussion, it sounds like Farmer already provides something this could build upon.

panesofglass avatar May 25 '20 13:05 panesofglass

Yes, there's already an IParameters interface that will create (currently secure only) parameters. We could expand upon this. Also though we would have to think about how to consume the parameter within each arm resource I guess?

isaacabraham avatar May 25 '20 14:05 isaacabraham

Seems the easiest option here would be to just make the secure parameters automatically wrap with something that could be declared explicitly for other parameters, then referenced where necessary? That may mean that a simple string value in some existing builders should now take a DU of type Parameter = Plain of value: string | Param of name: string?

panesofglass avatar May 25 '20 14:05 panesofglass

From the user's perspective they should see no difference, they should still be plain strings on the top. I'm not sure how this would impact - I guess the problem is where the ARM template is generated, that's where any value, rather than being a simple string, would now be a choice of what you have above. Hmmm :-/

This might have other knock-on effects with things like ARM expressions.

Happy for you to whip up a proof-of-concept just to see how it might bleed through the layers and we can explore together?

isaacabraham avatar May 25 '20 14:05 isaacabraham

Closing due to inactivity

Tom-Sloboda avatar Jun 02 '23 09:06 Tom-Sloboda