Skip to content

Commit fc99e9d

Browse files
committed
incorporate Jonny's comments
1 parent 71ce046 commit fc99e9d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

articles/azure-resource-manager/bicep/data-types.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ All strings in Bicep support interpolation. To inject an expression, surround it
274274
var storageName = 'storage${uniqueString(resourceGroup().id)}'
275275
```
276276

277-
## Multi-line strings
277+
### Multi-line strings
278278

279279
In Bicep, multi-line strings are defined between three single quote characters (`'''`) followed optionally by a newline (the opening sequence), and three single quote characters (`'''` - the closing sequence). Characters that are entered between the opening and closing sequence are read verbatim, and no escaping is necessary or possible.
280280

@@ -319,7 +319,7 @@ is ${blocked}'''
319319

320320
## Union types
321321

322-
In Bicep, a union type allows the creation of a combined type consisting of a set of sub-types. An assignment is valid if any of the individual sub-type assignments are permitted. The `|` character separates individual sub-types using an _or_ condition. For example, the syntax _'a' | 'b'_ means that a valid assignment could be either _'a'_ or _'b'_. Union types are translated into the allowed-value constraint in Bicep, so only literals are permitted as members. Unions can include any number of literal-typed expressions.
322+
In Bicep, a union type allows the creation of a combined type consisting of a set of sub-types. An assignment is valid if any of the individual sub-type assignments are permitted. The `|` character separates individual sub-types using an _or_ condition. For example, the syntax _'a' | 'b'_ means that a valid assignment could be either _'a'_ or _'b'_. Union types are translated into the [allowed-value](../templates/definitions.md#allowed-values) constraint in Bicep, so only literals are permitted as members. Unions can include any number of literal-typed expressions.
323323

324324
```bicep
325325
type color = 'Red' | 'Blue' | 'White'
@@ -372,6 +372,9 @@ There are some limitations with union type.
372372
type foo = 'a' | 1
373373
```
374374

375+
* Only literals are permitted as members.
376+
* All literals must be of the same primitive data type (e.g., all strings or all integers).
377+
375378
The union type syntax can be used in [user-defined data types](./user-defined-data-types.md).
376379

377380
## Secure strings and objects

0 commit comments

Comments
 (0)