Skip to content

Commit 723b3d3

Browse files
committed
update
1 parent ea3e7a2 commit 723b3d3

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

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

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Describes the functions to use in a Bicep file for working with arr
44
author: mumian
55
ms.topic: conceptual
66
ms.author: jgao
7-
ms.date: 04/12/2022
7+
ms.date: 09/26/2022
88
---
99

1010
# Array functions for Bicep
@@ -221,7 +221,7 @@ resource vnet 'Microsoft.Network/virtualNetworks@2021-02-01' = {
221221
}
222222
```
223223

224-
**dnsServers** is assigned if the array is not empty.
224+
In the [conditional expression](./operators-logical.md#conditional-expression--), the empty function is used to check whether the **dnsServers** array is an empty array.
225225

226226
## first
227227

@@ -267,15 +267,15 @@ The output from the preceding example with the default values is:
267267

268268
`flatten(arrayToFlatten)`
269269

270-
Takes an array of arrays, and returns an array of sub-array elements, in the original order. Sub-arrays are only flattened once, not recursively.
270+
Takes an array of arrays, and returns an array of subarray elements, in the original order. Subarrays are only flattened once, not recursively.
271271

272272
Namespace: [sys](bicep-functions.md#namespaces-for-functions).
273273

274274
### Parameters
275275

276276
| Parameter | Required | Type | Description |
277277
|:--- |:--- |:--- |:--- |
278-
| arrayToFlattern |Yes |array |The array of sub-arrays to flatten.|
278+
| arrayToFlattern |Yes |array |The array of subarrays to flatten.|
279279

280280
### Return value
281281

@@ -661,26 +661,11 @@ resource exampleApim 'Microsoft.ApiManagement/service@2021-08-01' = {
661661
}
662662
```
663663

664-
Assign **availabilityZones** to the **zones** property if **availabilityZones** contains 1 or more elements.
665-
666-
The following example is extracted from a quickstart template, [Backup Resource Manager VMs using Recovery Services vault
667-
](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.recoveryservices/recovery-services-backup-vms/):
668-
669-
```bicep
670-
param numberOfInstances int
671-
672-
resource virtualMachine 'Microsoft.Compute/virtualMachines@2021-03-01' = [for i in range(0, length(range(0, numberOfInstances))): {
673-
name: '${virtualMachineName}${range(0, numberOfInstances)[i]}'
674-
location: location
675-
properties: {
676-
...
677-
}
678-
...
679-
}
680-
```
664+
In the [conditional expression](./operators-logical.md#conditional-expression--), the `length` function check the length of the **availabilityZones** array.
681665

682666
More examples can be found in these quickstart Bicep files:
683-
667+
- [Backup Resource Manager VMs using Recovery Services vault
668+
](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.recoveryservices/recovery-services-backup-vms/)
684669
- [Deploy API Management into Availability Zones](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.apimanagement/api-management-simple-zones)
685670
- [Create a Firewall and FirewallPolicy with Rules and Ipgroups](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.network/azurefirewall-create-with-firewallpolicy-apprule-netrule-ipgroups)
686671
- [Create a sandbox setup of Azure Firewall with Zones](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.network/azurefirewall-with-zones-sandbox)
@@ -807,7 +792,7 @@ The output from the preceding example with the default values is:
807792

808793
### Quickstart examples
809794

810-
The following example is extracted from a quickstart template, [2 VMs in VNET - Internal Load Balancer and LB rules
795+
The following example is extracted from a quickstart template, [Two VMs in VNET - Internal Load Balancer and LB rules
811796
](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.compute/2-vms-internal-load-balancer):
812797

813798
```bicep

0 commit comments

Comments
 (0)