| title | BCP294 |
|---|---|
| description | Type unions must be reducible to a single ARM type (such as 'string', 'int', or 'bool'). |
| ms.topic | reference |
| ms.custom | devx-track-bicep |
| ms.date | 10/30/2025 |
This diagnostic occurs when you use values of different data types in a union type definition.
Type unions must be reducible to a single ARM type (such as 'string', 'int', or 'bool').
Error
The following example raises the diagnostic because there are different types used in the union type:
type foo = 'a' | 1You can fix the diagnostic by using a single data type for the union type definition:
type foo = 'a' | 'b'For more information about Bicep diagnostics, see Bicep core diagnostics.