Skip to content

Commit 9228c30

Browse files
Merge pull request #307233 from tfitzmac/1022any
clarify the any function
2 parents 2b7edda + a680b9a commit 9228c30

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

articles/azure-resource-manager/bicep/bicep-functions-any.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
2-
title: Bicep functions - any
3-
description: Describes the any function that is available in Bicep to convert types.
2+
title: Bicep functions - any()
3+
description: Describes the any() function that's available in Bicep to convert types.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 02/12/2025
6+
ms.date: 10/22/2025
77
---
88

9-
# Any function for Bicep
9+
# any() function (Bicep)
1010

11-
Bicep supports a function called `any()` to resolve type errors in the Bicep type system. You use this function when the format of the value you provide doesn't match what the type system expects. For example, if the property requires a number but you need to provide it as a string, like `'0.5'`. Use the `any()` function to suppress the error reported by the type system.
11+
Bicep supports a function named `any()` that suppresses type check errors. Use the Bicep `any()` function to cast a value to a type that's compatible with any data type. For example, use the `any()` function when a property requires a number but you need to provide a string, like `'0.5'`.
1212

13-
This function doesn't exist in the Azure Resource Manager template runtime. It's only used by Bicep and isn't emitted in the JSON for the built template.
13+
This function doesn't exist in the Azure Resource Manager template runtime. The Bicep `any()` function only affects compile-time type checking. It doesn't convert values at runtime and isn't emitted into the JSON for an Azure Resource Manager template.
1414

1515
> [!NOTE]
1616
> To help resolve type errors, let us know when missing or incorrect types required you to use the `any()` function. Add your details to the [missing type validation/inaccuracies](https://github.com/Azure/bicep/issues/784) GitHub issue.
1717
18-
## any
18+
## Syntax for the Bicep any() function
1919

2020
`any(value)`
2121

22-
Returns a value that is compatible with any data type.
22+
Returns a value that's compatible with any Bicep data type.
2323

2424
Namespace: [sys](bicep-functions.md#namespaces-for-functions).
2525

@@ -31,11 +31,11 @@ Namespace: [sys](bicep-functions.md#namespaces-for-functions).
3131

3232
### Return value
3333

34-
The value in a form that is compatible with any data type.
34+
The value in a form that's compatible with any data type in Bicep.
3535

3636
### Examples
3737

38-
The following example shows how to use the `any()` function to provide numeric values as strings.
38+
The following example shows how to use the Bicep `any()` function to provide numeric values as strings.
3939

4040
```bicep
4141
resource wpAci 'Microsoft.ContainerInstance/containerGroups@2023-05-01' = {
@@ -60,7 +60,7 @@ resource wpAci 'Microsoft.ContainerInstance/containerGroups@2023-05-01' = {
6060
}
6161
```
6262

63-
The function works on any assigned value in Bicep. The following example uses `any()` with a ternary expression as an argument.
63+
The function works on any assigned value in Bicep. The following example uses the Bicep `any()` function with a ternary expression as an argument.
6464

6565
```bicep
6666
publicIPAddress: any((pipId == '') ? null : {

0 commit comments

Comments
 (0)