Open SimonWahlin opened 2 months ago
Upvote if you want better support for this: https://github.com/Azure/bicep/issues/10432
One of the most common issues I'm seeing in generating user-defined param types for resource properties is open unions e.g.:
param kind 'BlobStorage' | 'BlockBlobStorage' | 'FileStorage' | 'Storage' | 'StorageV2' | string = 'StorageV2'
This is equivalent to "allow any string but here are suggestions".
These are the choices I see: I'm currently going with (4) since it is semantically equivalent, but you do lose intellisense.
Is your feature request related to a problem? Please describe. I often start to write a bicep template by creating a resource (manually or exported from existing resource) and then add parameters and potential logic from there.
Adding parameters is a tedious and time consuming task.
Describe the solution you'd like It would be really nice to be able to create a parameter from any property in my template by for example right-clicking and choosing "create parameter" or by setting the cursor on a property and use a command for "create parameter".
I would expect the parameter to have the same name and type as the property (maybe even a resource derived type if that feature is enabled) as the property and have a default value of what is currently assigned to the property.
The property should then have the parameter reference as a value.
If the property has a description in the type definition I would also expect the parameter to have the same description.