Azure / bicep

Bicep is a declarative language for describing and deploying Azure resources
MIT License
3.25k stars 754 forks source link

[Feature Request] Extend use-recent-api-versions to AVM warnings or create new property for bicepconfig.json #15189

Open riosengineer opened 1 month ago

riosengineer commented 1 month ago

Problem: (I did search previous issues but could not see this discussion)

Sometimes when you are using AVM in your Bicep templates, you can be using old versions without realising it. Either through copying an old template or the VS Code extension for Bicep sometimes auto-selects the incorrect version that isn't the latest, you are none the wiser.

My suggestion is that we need a way to get notifications on non-latest Azure Verified Module usage in templates. Either by extending the current use-recent-api-versions to include similar linting warning for older AVM usage like:

Can we either get the bicepconfig.json:

        "use-recent-api-versions": {
          "level": "warning",
          "maxAllowedAgeInDays": 0,
          "avm": true
        }

Or via an entirely new property within the bicepconfig.json to enable this, if technically possibly something like:

"use-latest-avm-versions": {
"level": "warning",
"enabled": "true" // false default
}

I think the benefits of having -something- that helps us catch older AVM usage, would be beneficial to everyone. AVM is gaining a lot of popularity also.

Hope that makes sense.

stephaniezyen commented 6 days ago

@StephenWeatherford can you respond to this?