-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-generate parameter files #512
Comments
Revisit this when we have resolved #399 |
One interesting scenario to consider here is simplifying parameters for services with complex topologies. Can we do something to make it easier for users that own services that operate in multiple clouds and/or locations? |
Just a note on this one, @StefanIvemo created a powershell module to help with this problem that may be of use to you. |
This is nice, but isn't the right solution to be able to create and use a What I mean is, isn't there a process to make all JSON code redundant so that we can eventually move everything over to Bicep? I want to be able to create my modules and parameters via Bicep files. Is this (full Bicep adoption) in the works? |
Tracked with #399. The order in which we want to tackle "parameter improvements" is the following:
We suspect that 1278 will get you 80% of the way there in terms of pushing errors left to authoring-time. At that point, we will re-evaluate how important 399 is. |
Super cool! Thanks, @alex-frankel . Apologies, I had done a search, but did not run across #399 |
Once this has been implemented, #3381 should be straightforward to add. |
This is related to #1759 as a means of closing the gap between ARM and Bicep |
We've heard a few more customers would love this feature. @polatengin, what's your status on this? |
I had a sync call with Marcin last Friday, I know what I should do, I'm currently working on the feature. I'll update here in a week 👍 @ucheNkadiCode |
Awesome! Thank you @polatengin, we look forward to this PR. I'll check back a little later. |
I created the PR #6601 couple of days ago, please let me know when you review it, @ucheNkadiCode 👍 |
In our upcoming discussion of this feature, @polatengin presented multiple options.
|
Discussion today: If a user selects "Generate params file". If there is a parameters.json file of the same name (e.g fun.parameters.json), we will gracefully add to the file and remove parameters that have been removed from the current file. We must also handle the scenario where a user adds/removes a default value for any of the parameters during this command. If they need to rename the file, they can use the VS Code capabilities to do so, we will not worry about it. If the user accidentally removes a parameter and we remove it from their overwritten paramers.json file, that's okay and they can use git source control to figure out the old values. Thanks again @polatengin |
Hello, Is this documented somewhere? |
I've tried running |
@benc-uk looking at it now, I think it's only going to generate entries for parameters which haven't been defaulted in your Bicep file. Could that explain why the parameters file is empty? What sort of behavior would you like to see here? |
Yes I validated this behaviour. I do have defaults for all my parameters. I suppose I expected the defaults to be mirrored into the new file as the defaults in there. |
That makes sense, I can definitely see the need to also include defaulted parameters. Would you mind raising an issue for that? |
Thanks @benc-uk! We appreciate the feedback. So one of the reasons we decided to not transfer over param defaults into the autogenerate parameter files was because a parameter file cannot handle values like "resourceGroup().location". So we just thought it was safer to do so in all situations. I have two questions for you:
Feel free to post a separate issue and we can continue the conversation there! |
Is your feature request related to a problem? Please describe.
Bicep generates (builds) ARM JSON templates, but it does not generate parameter files.
Describe the solution you'd like
Use all declared parameters from a
{filename}.bicep
file and generate a{filename}.parameters.json
file by using e.g.bicep build --generate-params-file
switch.The text was updated successfully, but these errors were encountered: