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 uses of the concat function that can be replaced by string interpolation.
Use the following value in the Bicep configuration file to customize rule settings:
prefer-interpolation
Use string interpolation instead of the concat
function.
The following example fails this test because the concat
function is used.
param suffix string = '001'
var vnetName = concat('vnet-', suffix)
You can fix it by replacing concat
with string interpolation. The following example passes this test.
param suffix string = '001'
var vnetName = 'vnet-${suffix}'
Optionally, you can use Quickfix to replace the concat
with string interpolation:
For more information about the linter, see Use Bicep linter.