You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/data-types.md
+20-8Lines changed: 20 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Data types in Bicep
3
3
description: This article describes the data types that are available in Bicep.
4
4
ms.topic: reference
5
-
ms.date: 01/02/2026
5
+
ms.date: 01/27/2026
6
6
ms.custom: devx-track-bicep
7
7
---
8
8
@@ -355,14 +355,11 @@ var storageName = 'storage${uniqueString(resourceGroup().id)}'
355
355
356
356
### Multi-line strings
357
357
358
-
In Bicep, multi-line strings are defined between three single quotation marks (`'''`) followed optionally by a newline (the opening sequence) and three single quotation marks (`'''` is the closing sequence). Characters that are entered between the opening and closing sequence are read verbatim. Escaping isn't necessary or possible.
358
+
## Multi-line strings
359
359
360
-
> [!NOTE]
361
-
> The Bicep parser reads every character as it is. Depending on the line endings of your Bicep file, newlines are interpreted as either `\r\n` or `\n`.
362
-
>
363
-
> Interpolation isn't currently supported in multi-line strings. Because of this limitation, you might need to use the [`concat`](./bicep-functions-string.md#concat) function instead of using [interpolation](#strings).
364
-
>
365
-
> Multi-line strings that contain `'''` aren't supported.
360
+
You can define a multi-line string by enclosing it in three single quotation marks (`'''`). The string content is preserved exactly as written, so escape characters are not required. The delimiter `'''` cannot appear within the string.
361
+
362
+
The string may begin immediately after the opening delimiter or on the following line. In both cases, the resulting value does not include a leading newline. Line breaks are interpreted as `\r\n` or `\n`, depending on the line-ending format of the Bicep file.
366
363
367
364
```bicep
368
365
// evaluates to "hello!"
@@ -389,11 +386,26 @@ var myVar5 = '''
389
386
comments // are included
390
387
/* because everything is read as-is */
391
388
'''
389
+
```
390
+
391
+
With Bicep CLI version v0.40.2 or higher, string interpolation is supported. An optional `$` prefix can be added before the opening delimiter to enable string interpolation using standard Bicep `${...}` syntax. If you need to include `${...}` as a literal value without escaping, you can control interpolation by repeating the `$` prefix. Interpolation is only performed when the number of `$` characters preceding `${...}` matches the number of `$` characters used in the opening delimiter.
392
392
393
+
```bicep
393
394
// evaluates to "interpolation\nis ${blocked}"
394
395
// note ${blocked} is part of the string, and is not evaluated as an expression
395
396
var myVar6 = '''interpolation
396
397
is ${blocked}'''
398
+
399
+
// evaluates to "this is a test"
400
+
var interpolated = 'a test'
401
+
var myVar7 = $'''
402
+
this is ${interpolated}'''
403
+
404
+
// evaluates to "this is a test\nthis is not ${interpolated}"
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/file.md
+1-27Lines changed: 1 addition & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Bicep file structure and syntax
3
3
description: Understand how to use declarative syntax to understand the structure and properties of Bicep files.
4
4
ms.topic: article
5
5
ms.custom: devx-track-bicep
6
-
ms.date: 07/25/2025
6
+
ms.date: 01/13/2026
7
7
---
8
8
9
9
# Bicep file structure and syntax
@@ -464,32 +464,6 @@ The following example shows a multiline comment.
464
464
param existingKeyVaultName string
465
465
```
466
466
467
-
## Multi-line strings
468
-
469
-
You can break a string into multiple lines. Use three single quotation marks `'''` to start and end the multi-line string.
470
-
471
-
Characters within the multi-line string are handled as is. Escape characters are unnecessary. You can't include `'''` in the multi-line string. String interpolation isn't currently supported.
472
-
473
-
You can start your string right after the opening `'''`, or include a new line. In either case, the resulting string doesn't include a new line. Depending on the line endings in your Bicep file, new lines are interpreted as `\r\n` or `\n`.
474
-
475
-
The following example shows a multi-line string.
476
-
477
-
```bicep
478
-
var stringVar = '''
479
-
this is multi-line
480
-
string with formatting
481
-
preserved.
482
-
'''
483
-
```
484
-
485
-
The preceding example is equivalent to the following JSON:
486
-
487
-
```json
488
-
"variables": {
489
-
"stringVar": "this is multi-line\r\n string with formatting\r\n preserved.\r\n"
490
-
}
491
-
```
492
-
493
467
## Multiple-line declarations
494
468
495
469
You can now use multiple lines in function, array, and object declarations. This feature requires [Bicep CLI version 0.7.X or higher](./install.md).
0 commit comments