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 syntax that uses string interpolation when it isn't needed.
Linter rule code
Use the following value in the Bicep configuration file to customize rule settings:
simplify-interpolation
Solution
Remove any uses of string interpolation that isn't part of an expression to combine values.
The following example fails this test because it just references a parameter.
param AutomationAccountName string
resource AutomationAccount 'Microsoft.Automation/automationAccounts@2022-08-08' = {
name: '${AutomationAccountName}'
...
}
You can fix it by removing the string interpolation syntax.
param AutomationAccountName string
resource AutomationAccount 'Microsoft.Automation/automationAccounts@2022-08-08' = {
name: AutomationAccountName
...
}
Optionally, you can use Quick Fix to remove the string interpolation syntax:
Next steps
For more information about the linter, see Use Bicep linter.