Muokkaa

Jaa


Linter rule - use recent module versions

This rule looks for old public module versions. It's recommended to use the most recent module versions.

Note

This rule is off by default. Change the level in bicepconfig.json to enable it.

Linter rule code

To customize rule settings, use the following value in the Bicep configuration file:

use-recent-module-versions

Solution

The following example fails this test because an older module version is used:

module storage 'br/public:avm/res/storage/storage-account:0.6.0' = {
  name: 'myStorage'
  params: {
    name: 'store${resourceGroup().name}'
  }
}

Use Quick Fix to use the latest module version:

A screenshot of using Quick fix for the use-recent-module-versions linter rule.

Next steps

For more information about the linter, see Use Bicep linter.