Skip to content

feat: Introduce Zone-Redundancy interface for Bicep#1870

Merged
AlexanderSehr merged 13 commits intomainfrom
users/alsehr/zonalInterface
Mar 19, 2025
Merged

feat: Introduce Zone-Redundancy interface for Bicep#1870
AlexanderSehr merged 13 commits intomainfrom
users/alsehr/zonalInterface

Conversation

@AlexanderSehr
Copy link
Contributor

@AlexanderSehr AlexanderSehr commented Feb 21, 2025

Overview/Summary

Across AVM, we now have several different approach to deploying both zonal & zone-redundant resources. The tricky one is especially the former, as users want the option to not deploy the resource into a zone.

E.g.

@description('Required. If set to 1, 2 or 3, the availability zone is hardcoded to that value. If  set to -1, then availability zones are not used. Note that the availability zone number here are the logical availability zone in your Azure subscription. Different subscriptions might have a different mapping of the physical zone and logical zone.To understand more, please refer to [Physical and logical availability zones](https://learn.microsoft.com/en-us/azure/reliability/availability-zones-overview?tabs=azure-cli#physical-and-logical-availability-zones) and [Distribute VMs and disks across availability zones](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-high-availability#distribute-vms-and-disks-across-availability-zones).')
@allowed([
  -1
  1
  2
  3
])
param availabilityZone int

(source)

vs

@description('Optional. Specifies the availability zone the pool\'s primary replica is pinned to.')
param availabilityZone '1' | '2' | '3' | 'NoPreference' = 'NoPreference'

(source)

vs

@sys.description('Conditional. Configuration of the availability zone for the Elastic SAN. Required if `Sku` is `Premium_LRS`. If this parameter is not provided, the `Sku` parameter will default to Premium_ZRS. Note that the availability zone number here are the logical availability zone in your Azure subscription. Different subscriptions might have a different mapping of the physical zone and logical zone. To understand more, please refer to [Physical and logical availability zones](https://learn.microsoft.com/en-us/azure/reliability/availability-zones-overview?tabs=azure-cli#physical-and-logical-availability-zones).')
@sys.allowed([1, 2, 3])
param availabilityZone int?

(source)

Also, we should probably reference this interface from the Availability Zone spec - but as this is shared across languages, I'm not sure if that makes sense.

image

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 Maintainers need to triage still label Feb 21, 2025
@AlexanderSehr AlexanderSehr self-assigned this Feb 21, 2025
@AlexanderSehr AlexanderSehr changed the title Users/alsehr/zonal interface feat: Introduce Zone-Redundancy interface for Bicep Feb 21, 2025
@AlexanderSehr AlexanderSehr added Language: Bicep 💪 This is related to the Bicep IaC language Needs: Core Team 🧞 This item needs the AVM Core Team to review it labels Feb 21, 2025
@AlexanderSehr AlexanderSehr marked this pull request as ready for review March 4, 2025 17:34
@AlexanderSehr AlexanderSehr requested a review from a team as a code owner March 4, 2025 17:34
@AlexanderSehr AlexanderSehr enabled auto-merge (squash) March 4, 2025 17:34
@AlexanderSehr
Copy link
Contributor Author

AlexanderSehr commented Mar 18, 2025

@Azure/avm-core-team anybody?

Note: We agreed on -1,1,2,3

@eriqua eriqua self-assigned this Mar 19, 2025
@eriqua eriqua added Type: Documentation 📄 Improvements or additions to documentation and removed Needs: Triage 🔍 Maintainers need to triage still labels Mar 19, 2025
AlexanderSehr and others added 3 commits March 19, 2025 12:59
Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com>
Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com>
Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com>
Copy link
Contributor

@eriqua eriqua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗

@AlexanderSehr AlexanderSehr merged commit 968fae2 into main Mar 19, 2025
7 checks passed
@AlexanderSehr AlexanderSehr deleted the users/alsehr/zonalInterface branch March 19, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language: Bicep 💪 This is related to the Bicep IaC language Needs: Core Team 🧞 This item needs the AVM Core Team to review it Type: Documentation 📄 Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants