Skip to content

Commit 1434efc

Browse files
committed
add more samples
1 parent 1a58a41 commit 1434efc

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ The output from the preceding example with the default values is:
5454
| stringOutput | Array | ["efgh"] |
5555
| objectOutput | Array | [{"a": "b", "c": "d"}] |
5656

57+
### Quickstart samples
58+
5759
The following example is extracted from a quickstart template, [SQL Server VM with performance optimized storage settings
5860
](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.sqlvirtualmachine/sql-vm-new-storage):
5961

@@ -183,6 +185,34 @@ The output from the preceding example with the default values is:
183185
| arrayTrue | Bool | True |
184186
| arrayFalse | Bool | False |
185187

188+
### Quickstart samples
189+
190+
The following sample is extracted from a quickstart template, [Application Gateway with WAF and firewall policy](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.network/application-gateway-waf-firewall-policy):
191+
192+
```bicep
193+
backendHttpSettingsCollection: [for backendHttpSetting in backendHttpSettings: {
194+
name: backendHttpSetting.name
195+
properties: {
196+
port: backendHttpSetting.port
197+
protocol: backendHttpSetting.protocol
198+
cookieBasedAffinity: backendHttpSetting.cookieBasedAffinity
199+
affinityCookieName: contains(backendHttpSetting, 'affinityCookieName') ? backendHttpSetting.affinityCookieName : null
200+
requestTimeout: backendHttpSetting.requestTimeout
201+
connectionDraining: backendHttpSetting.connectionDraining
202+
probe: contains(backendHttpSetting, 'probeName') ? json('{"id": "${resourceId('Microsoft.Network/applicationGateways/probes', applicationGatewayName, backendHttpSetting.probeName)}"}') : null
203+
trustedRootCertificates: contains(backendHttpSetting, 'trustedRootCertificate') ? json('[{"id": "${resourceId('Microsoft.Network/applicationGateways/trustedRootCertificates', applicationGatewayName, backendHttpSetting.trustedRootCertificate)}"}]') : null
204+
hostName: contains(backendHttpSetting, 'hostName') ? backendHttpSetting.hostName : null
205+
pickHostNameFromBackendAddress: contains(backendHttpSetting, 'pickHostNameFromBackendAddress') ? backendHttpSetting.pickHostNameFromBackendAddress : false
206+
}
207+
}]
208+
```
209+
210+
More samples can be found in these quickstart Bicep files:
211+
212+
- [Route table with routes](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.network/route-table-create)
213+
- [Virtual Network with diagnostic logs](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.network/vnet-create-with-diagnostic-logs)
214+
- [App Service Quickstart - Linux App](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.web/app-service-docs-linux)
215+
186216
## empty
187217

188218
`empty(itemToTest)`

0 commit comments

Comments
 (0)