Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This rule finds existing resources that aren't referenced anywhere in the Bicep file.
Use the following value in the Bicep configuration file to customize rule settings:
no-unused-existing-resources
To reduce confusion in your template, delete any existing resources that are defined but not used. This test finds any existing resource that isn't used anywhere in the template.
The following example fails this test because the existing resource stg is declared but never used:
resource stg 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
name: 'examplestorage'
}
Use Quick Fix to remove the unused existing resource:
For more information about the linter, see Use Bicep linter.