bicep
bicep copied to clipboard
Deprecated decorator for module params
Is your feature request related to a problem? Please describe. When developing module packs sometimes we need to remove a parameter (or replace it with a new one) , keeping old one for some time until users switch to new one.
Describe the solution you'd like
I'd like to have a @deprecated('description') decorator that I can place on parameter so bicep during compile time will throw warning and the VSCode extension will visually indicate on the module params that this one is deprecated - both in usages inside module and on value assignments.
Great suggestion!
Might be a separate issue, but looks like we will also need a way to mark the modules themselves as deprecated. I'm assuming there is some way to do this in the OCI manifest annotations.
Just encountered a use case for this on my team. We maintain a common registry of Bicep modules for many development teams in our org. Occasionally we want to remove a parameter without breaking teams who use the latest version. A decorator resulting in a warning log message during deployment would be an effective additional channel to communicate plans for deprecating a parameter.
@alex-frankel was speaking with @anthony-c-martin based off of the community call today where we talked about the "Deprecation" guidance in AVM, and this feels like it could very easily simplify our guidance and decrease the risk of "paper cuts" by AVM module consumers.
Any chance we can bump this up to get implemented sooner rather than later (please 😁)?
I will add it to our list to triage for our [Se] planning (which should be wrapping up today), but I would guess we won't be able to prioritize this anytime soon. Is there anyone on the AVM side that would be interested in contributing here? We'd be very happy to help ramp anyone up to help with this.
This would be very useful when building modules shared between many teams.
Should also be supported in module outputs.