-
Notifications
You must be signed in to change notification settings - Fork 381
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
[AVM Module Issue]: Strong types for parameters #1642
Comments
@weikanglim, thanks for submitting this issue for the A member of the @azure/avm-res-app-containerapp-module-owners-bicep or @azure/avm-res-app-containerapp-module-contributors-bicep team will review it soon! |
Hi @weikanglim, I agree completely and will work on getting this in. Adding @AlexanderSehr as it sounds like this maybe needs to be scaled to additional modules as well. |
Hey @weikanglim, The ask is absolutely valid and yes it all module owners ideally do that. I think the only arrays & objects that currenty have this consistently are the extension resources (e.g., role assignments, private endpoints, etc.). Up until now we had contributions here and there from community or the owners, adding UDTs to individual modules - but not on scale. Personally, there are 2 reasons I've not been running around adding / asking to add user defined types to modules:
Either feature seems to be released soon, so instead of investing time now in manually creating every type, it might be wise to wait for them to be available and not 'undo' the work. These are anyways only my subjective thoughts on the matter. When I'm using AVM modules and there is such a case (object without a type), I do usually one of 2 things:
Neither is as good as UDTs, of course, but at least helped me to bridge the gap for the time being. I hope this was somewhat insightful. Please let me know what you think. |
+1 on Alex's comments. Once those two features are non-experimental, can we/should we introduce CI validation to enforce that simple |
Thanks for the additional insight @AlexanderSehr. I will hold off on adding the UDTs for the time being until the experimental features are GA. I've added the External Changes label but let me know if there is anything else I need to do as the module owner. |
Hey @alex-frankel, thanks for adding your thoughts and yes. |
I agree with the general request and remember that has been the plan especially for child modules since UDT has been released as experimental back in the CARML days. I'd also vouch for a SHOULD over a MUST, i.e., an incremental approach and a static validation soft failure once above experimental features go GA. I'm thinking about edge cases such as Microsoft.Web sites/config or the siteConfig object. I'm sure others will pop up. |
Up to you all on SHOULD vs MUST. I'd love to see a transition to MUST at some point, but certainly SHOULD is great progress. By the way, compile-time imports is now GA. So we are only waiting on |
Eagerly awaiting this feature - use of UDTs coupled with RDTs would make for a really rich development experience. I want to migrate to AVM ASAP but the overhead of having to look at implementation details to get my array/object contents correct is just too big and time-consuming at the moment. |
I also observed this in other module |
I have seen import feature already being used in this repo (see sql server). Does this mean that we are OK to use that strong types and import features? I'd love to do that TBH |
Hey @peterbud, Also, on the note of UDTs, we'll also introduce a spec asking module owners to add the |
Check for previous/existing GitHub issues
Issue Type?
Feature Request
Module Name
avm/res/app/container-app
(Optional) Module Version
No response
Description
Note: I'm using container-app as an example, but the feedback applies generally to all object types surfaced in AVM.
When creating a container app, it is common to supply the container definition (
containers
) and a list ofsecrets
. Currently, the module doesn't provide strongly typed parameters to do so. They are simplyarray
, orobject
.This unfortunately means that I cannot effectively use the module without also looking at the actual implementation detail for
Microsoft.App/containerApps
.In general, I expect that using an AVM module should be as easy as authoring the underlying RP resource. It would be great if all the documentation already present on the RP swagger would just show up when we're doing a simple passthrough in the module. This may require upstream Bicep support to scale, but I'm opening the issue here to start the discussion.
(Optional) Correlation Id
No response
The text was updated successfully, but these errors were encountered: