I have a problem inserting a variable into a multiline string using Bicep.
What works:
I have this param:
param fallbackResourceId string
inserted into a big json multiline string like this:
"fallbackResourceIds": [
"${fallbackResourceId}"
],
This works an evaluates to the value when the resource is deployed. However, I also have this variable (also tried as param):
param sourceDataCloudRoleName string
param sourceDataOperationName string
var sourceQuery1 = 'tracesrn| extend prop_syncTableRowIds_array = parse_json(customDimensions.prop__syncRowIds)rn| mv-expand prop_syncRowIds_arrayrn| where tostring(prop_syncTableRowIds_array) contains {SyncTableRowId}rn| where cloud_RoleName =~ "${sourceDataCloudRoleName}" and operation_Name =~ "${sourceDataOperationName}"'
This is inserted as follows:
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "${sourceQuery1}",
"size": 0,
"title": "Search by "SyncRowId"",
"timeContextFromParameter": "TimeRange",
"queryType": 0,
"resourceType": "microsoft.insights/components"
},
"name": "query - 1"
},
However, here the workbook says that the parameter is not assigned.