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 diagnostic occurs when the Bicep compiler can't determine the exact value of an interpolated string key.
String interpolation is not supported for keys on objects of type <type-definition>.
Warning / Error
Remove string interpolation.
The following example raises the diagnostic because string interpolation is used for specifying the key sku1
:
var name = 'sku'
type storageAccountConfigType = {
name: string
sku1: string
}
param foo storageAccountConfigType = {
name: 'myStorage'
'${name}1': 'Standard_LRS'
}
You can fix the issue by adding the missing properties:
var name = 'sku'
type storageAccountConfigType = {
name: string
sku1: string
}
param foo storageAccountConfigType = {
name: 'myStorage'
sku1: 'Standard_LRS'
}
For more information about Bicep diagnostics, see Bicep core diagnostics.