Skip to content

[RDBMS] az postgres flexible-server create/update: Show high availability feature with zonal resiliency argument#32482

Merged
evelyn-ys merged 5 commits intoAzure:devfrom
nasc17:nasc/maz1126
Dec 5, 2025
Merged

[RDBMS] az postgres flexible-server create/update: Show high availability feature with zonal resiliency argument#32482
evelyn-ys merged 5 commits intoAzure:devfrom
nasc17:nasc/maz1126

Conversation

@nasc17
Copy link
Member

@nasc17 nasc17 commented Dec 2, 2025

Related command
az postgres flexible-server create/update

Description
Use of --zonal-resiliency command to better align to portal MAZ experience. Primary and standby instances are placed in separate zones for better availability. If zonal capacity is limited, you can allow both in the same zone by checking the box.

This also introduces the deprecation of --high-availability

Testing Guide
az postgres flexible-server create --zonal-resiliency Enabled --high-availability SameZone --allow-same-zone -g nasc-livesite -n nasctest-121-4093 --location eastus
Argument '--high-availability' has been deprecated and will be removed in next breaking change release(2.86.0) scheduled for May 2026. Use '--zonal-resiliency' instead.
Checking the existence of the resource group 'nasc-livesite'...
Resource group 'nasc-livesite' exists ? : True
Setting both --high-availability and --zonal-resiliency is not allowed. Please set only --zonal-resiliency to move forward.

History Notes
[RDBMS] az postgres flexible-server create/update: Show high availability feature with zonal resiliency argument

Copilot AI review requested due to automatic review settings December 2, 2025 01:54
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Dec 2, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Dec 2, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️rdbms
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd postgres flexible-server create cmd postgres flexible-server create added parameter allow_same_zone
⚠️ 1006 - ParaAdd postgres flexible-server create cmd postgres flexible-server create added parameter zonal_resiliency
⚠️ 1006 - ParaAdd postgres flexible-server update cmd postgres flexible-server update added parameter allow_same_zone
⚠️ 1006 - ParaAdd postgres flexible-server update cmd postgres flexible-server update added parameter zonal_resiliency

@yonzhan
Copy link
Collaborator

yonzhan commented Dec 2, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new user-facing experience for configuring high availability in PostgreSQL flexible servers by adding --zonal-resiliency and --allow-same-zone arguments while deprecating the existing --high-availability parameter. The change aligns the CLI with the Azure Portal's Multi-Availability Zone (MAZ) experience.

Key Changes:

  • New --zonal-resiliency parameter (Enabled/Disabled) replaces --high-availability (ZoneRedundant/SameZone/Disabled)
  • New --allow-same-zone flag permits primary and standby instances in the same zone when multi-zone capacity is limited
  • Mutual exclusivity validation prevents using both old and new parameters together

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
validators.py Adds validation logic for new zonal resiliency parameters, including mutual exclusivity checks and single-AZ region handling
flexible_server_custom_postgres.py Updates create and update functions to handle new parameters and derive high availability mode from zonal resiliency settings
_params.py Defines new argument types for --zonal-resiliency and --allow-same-zone in both create and update commands
_helptext_pg.py Adds example demonstrating usage of new --zonal-resiliency and --allow-same-zone parameters
_breaking_change.py Registers deprecation for --high-availability parameter (new file)
test_rdbms_flexible_commands.py Updates test to use new --zonal-resiliency parameter instead of deprecated --high-availability

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@evelyn-ys
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@nasc17
Copy link
Member Author

nasc17 commented Dec 4, 2025

@evelyn-ys please run checks.

@yonzhan
Copy link
Collaborator

yonzhan commented Dec 4, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@nasc17
Copy link
Member Author

nasc17 commented Dec 4, 2025

@evelyn-ys checks please merge

@evelyn-ys evelyn-ys merged commit aa0680e into Azure:dev Dec 5, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Portal az portal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants