Skip to content

Commit ea3e7a2

Browse files
committed
[Array functions] add samples from quickstart templates
1 parent dc16ed6 commit ea3e7a2

File tree

1 file changed

+46
-3
lines changed

1 file changed

+46
-3
lines changed

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

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ The output from the preceding example with the default values is:
198198
### Quickstart examples
199199

200200
The following example is extracted from a quickstart template, [SQL Server VM with performance optimized storage settings
201-
](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.attestation/attestation-provider-create\main.bicep):
201+
](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.attestation/attestation-provider-create/main.bicep):
202202

203203
```bicep
204204
@description('Array containing DNS Servers')
@@ -639,8 +639,8 @@ The output from the preceding example with the default values is:
639639

640640
### Quickstart examples
641641

642-
The following example is extracted from a quickstart template, [SQL Server VM with performance optimized storage settings
643-
](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts//microsoft.apimanagement/api-management-create-with-external-vnet-publicip):
642+
The following example is extracted from a quickstart template, [Deploy API Management in external VNet with public IP
643+
](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.apimanagement/api-management-create-with-external-vnet-publicip):
644644

645645
```bicep
646646
@description('Numbers for availability zones, for example, 1,2,3.')
@@ -805,6 +805,49 @@ The output from the preceding example with the default values is:
805805
| ---- | ---- | ----- |
806806
| rangeOutput | Array | [5, 6, 7] |
807807

808+
### Quickstart examples
809+
810+
The following example is extracted from a quickstart template, [2 VMs in VNET - Internal Load Balancer and LB rules
811+
](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.compute/2-vms-internal-load-balancer):
812+
813+
```bicep
814+
...
815+
var numberOfInstances = 2
816+
817+
resource networkInterface 'Microsoft.Network/networkInterfaces@2021-05-01' = [for i in range(0, numberOfInstances): {
818+
name: '${networkInterfaceName}${i}'
819+
location: location
820+
properties: {
821+
...
822+
}
823+
}]
824+
825+
resource vm 'Microsoft.Compute/virtualMachines@2021-11-01' = [for i in range(0, numberOfInstances): {
826+
name: '${vmNamePrefix}${i}'
827+
location: location
828+
properties: {
829+
...
830+
}
831+
}]
832+
```
833+
834+
The Bicep file creates two networkInterface and two virtualMachine resources.
835+
836+
More examples can be found in these quickstart Bicep files:
837+
838+
- [Multi VM Template with Managed Disk](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.compute/vm-copy-managed-disks)
839+
- [Create a VM with multiple empty StandardSSD_LRS Data Disks](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.compute/vm-with-standardssd-disk)
840+
- [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)
841+
- [Create an Azure Firewall with IpGroups](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.network/azurefirewall-create-with-ipgroups-and-linux-jumpbox)
842+
- [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)
843+
- [Create an Azure Firewall with multiple IP public addresses](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.network/fw-docs-qs)
844+
- [Create a standard load-balancer](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.network/load-balancer-standard-create)
845+
- [Azure Traffic Manager VM example](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.network/traffic-manager-vm)
846+
- [Create A Security Automation for specific Alerts](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.security/securitycenter-create-automation-for-alertnamecontains)
847+
- [SQL Server VM with performance optimized storage settings](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.sqlvirtualmachine/sql-vm-new-storage)
848+
- [Create a storage account with multiple Blob containers](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.storage/storage-multi-blob-container)
849+
- [Create a storage account with multiple file shares](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.storage/storage-multi-file-share)
850+
808851
## skip
809852

810853
`skip(originalValue, numberToSkip)`

0 commit comments

Comments
 (0)