Skip to content

Commit 3cd7310

Browse files
authored
Merge pull request #183731 from tfitzmac/1228zones
clarify zone support for pickzones
2 parents a6393c8 + 02fb5a5 commit 3cd7310

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Describes the functions to use in a Bicep file to retrieve values a
44
author: mumian
55
ms.author: jgao
66
ms.topic: conceptual
7-
ms.date: 12/09/2021
7+
ms.date: 12/28/2021
88
---
99

1010
# Resource functions for Bicep
@@ -410,7 +410,7 @@ To determine which resource types have a list operation, you have the following
410410

411411
`pickZones(providerNamespace, resourceType, location, [numberOfZones], [offset])`
412412

413-
Determines whether a resource type supports zones for a region.
413+
Determines whether a resource type supports zones for a region. This function **only supports zonal resources**. Zone redundant services return an empty array. For more information, see [Azure Services that support Availability Zones](../../availability-zones/az-region.md).
414414

415415
Namespace: [az](bicep-functions.md#namespaces-for-functions).
416416

@@ -451,13 +451,19 @@ When the resource type or region doesn't support zones, an empty array is return
451451
]
452452
```
453453

454+
### Remarks
455+
456+
There are different categories for Azure Availability Zones - zonal and zone-redundant. The `pickZones` function can be used to return an availability zone for a zonal resource. For zone redundant services (ZRS), the function returns an empty array. Zonal resources typically have a `zones` property at the top level of the resource definition. To determine the category of support for availability zones, see [Azure Services that support Availability Zones](../../availability-zones/az-region.md).
457+
458+
To determine if a given Azure region or location supports availability zones, call the `pickZones` function with a zonal resource type, such as `Microsoft.Network/publicIPAddresses`. If the response isn't empty, the region supports availability zones.
459+
454460
### pickZones example
455461

456462
The following Bicep file shows three results for using the `pickZones` function.
457463

458464
```bicep
459465
output supported array = pickZones('Microsoft.Compute', 'virtualMachines', 'westus2')
460-
output notSupportedRegion array = pickZones('Microsoft.Compute', 'virtualMachines', 'northcentralus')
466+
output notSupportedRegion array = pickZones('Microsoft.Compute', 'virtualMachines', 'westus')
461467
output notSupportedType array = pickZones('Microsoft.Cdn', 'profiles', 'westus2')
462468
```
463469

articles/azure-resource-manager/templates/template-functions-resource.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Template functions - resources
33
description: Describes the functions to use in an Azure Resource Manager template (ARM template) to retrieve values about resources.
44
ms.topic: conceptual
5-
ms.date: 12/09/2021
5+
ms.date: 12/28/2021
66
ms.custom: devx-track-azurepowershell
77
---
88

@@ -324,7 +324,7 @@ The next example shows a `list` function that takes a parameter. In this case, t
324324

325325
`pickZones(providerNamespace, resourceType, location, [numberOfZones], [offset])`
326326

327-
Determines whether a resource type supports zones for the specified location or region. This function only supports zonal resources, zone redundant services will return an empty array. For more information, see [Azure Services that support Availability Zones](../../availability-zones/az-region.md). To use the pickZones function with zone redundant services, see the examples below.
327+
Determines whether a resource type supports zones for the specified location or region. This function **only supports zonal resources**. Zone redundant services return an empty array. For more information, see [Azure Services that support Availability Zones](../../availability-zones/az-region.md).
328328

329329
### Parameters
330330

@@ -365,9 +365,9 @@ When the resource type or region doesn't support zones, an empty array is return
365365

366366
### Remarks
367367

368-
There are different categories for Azure Availability Zones - zonal and zone-redundant. The `pickZones` function can be used to return an availability zone number or numbers for a zonal resource. For zone redundant services (ZRS), the function will return an empty array. Zonal resources can typically be identified by the use of a `zones` property on the resource header. Zone redundant services have different ways to identify and use availability zones per resource. Use the documentation for a specific service to determine the category of support for availability zones. For more information, see [Azure Services that support Availability Zones](../../availability-zones/az-region.md).
368+
There are different categories for Azure Availability Zones - zonal and zone-redundant. The `pickZones` function can be used to return an availability zone for a zonal resource. For zone redundant services (ZRS), the function returns an empty array. Zonal resources typically have a `zones` property at the top level of the resource definition. To determine the category of support for availability zones, see [Azure Services that support Availability Zones](../../availability-zones/az-region.md).
369369

370-
To determine if a given Azure region or location supports availability zones, call the `pickZones` function with a zonal resource type, for example `Microsoft.Storage/storageAccounts`. If the response is non-empty, the region supports availability zones.
370+
To determine if a given Azure region or location supports availability zones, call the `pickZones` function with a zonal resource type, such as `Microsoft.Network/publicIPAddresses`. If the response isn't empty, the region supports availability zones.
371371

372372
### pickZones example
373373

0 commit comments

Comments
 (0)