bicep icon indicating copy to clipboard operation
bicep copied to clipboard

Deprecated decorator for module params

Open miqm opened this issue 4 years ago • 5 comments

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.

miqm avatar Jul 07 '21 08:07 miqm

Great suggestion!

anthony-c-martin avatar Jul 07 '21 15:07 anthony-c-martin

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.

alex-frankel avatar Apr 10 '23 23:04 alex-frankel

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.

mrossi-kmx avatar Jul 26 '24 16:07 mrossi-kmx

@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 😁)?

jtracey93 avatar Oct 03 '24 17:10 jtracey93

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.

alex-frankel avatar Oct 07 '24 16:10 alex-frankel

This would be very useful when building modules shared between many teams.

Should also be supported in module outputs.

abjugard avatar Oct 07 '25 09:10 abjugard