Skip to content

Commit f68d56b

Browse files
[PostgreSQL] az postgres flexible-server create, replica create, restore, geo-restore, and revive-dropped: Add breaking change announcement for command behavioral change related to network resources (#33077)
1 parent e0832af commit f68d56b

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

src/azure-cli/azure/cli/command_modules/postgresql/_breaking_change.py

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,46 @@
66
from azure.cli.core.breaking_change import (register_argument_deprecate, register_command_group_deprecate,
77
register_other_breaking_change)
88

9+
NETWORK_RESOURCE_BREAKING_CHANGE_MESSAGE = (
10+
'This command will stop creating new network resources or altering existing ones which are required '
11+
'for the server to function, such as virtual networks, subnets, IP ranges, etc. It will instead '
12+
'require users to provide the necessary network resources created beforehand using the corresponding '
13+
'commands from the `az network` module. This change will take effect in next breaking change '
14+
'release scheduled for May 2026.'
15+
)
16+
17+
18+
def _register_network_resource_breaking_change(command_name):
19+
register_other_breaking_change(command_name, message=NETWORK_RESOURCE_BREAKING_CHANGE_MESSAGE)
20+
register_argument_deprecate(command_name, '--address-prefixes')
21+
register_argument_deprecate(command_name, '--subnet-prefixes')
22+
23+
24+
# These commands will stop creating or altering required network resources and will instead require
25+
# users to provide those resources up front using the corresponding `az network` commands.
26+
# Parameters --address-prefixes and --subnet-prefixes will also be deprecated for these commands as part of this change.
27+
for network_command in (
28+
'postgres flexible-server create',
29+
'postgres flexible-server replica create',
30+
'postgres flexible-server restore',
31+
'postgres flexible-server geo-restore',
32+
'postgres flexible-server revive-dropped'):
33+
_register_network_resource_breaking_change(network_command)
34+
35+
936
# High availability command argument changes
1037
register_argument_deprecate('postgres flexible-server create', '--high-availability', redirect='--zonal-resiliency')
1138
register_argument_deprecate('postgres flexible-server update', '--high-availability', redirect='--zonal-resiliency')
1239

13-
# Index Tuning command argument changes
40+
# Index Tuning command group renamed to Autonomous Tuning as the feature has expanded to
41+
# include more types of recommendations beyond just index tuning
1442
register_command_group_deprecate(command_group='postgres flexible-server index-tuning',
1543
redirect='postgres flexible-server autonomous-tuning',
1644
message='Index tuning feature has now expanded its capabilities to support '
1745
'other automatically generated recommendations which are covered by the '
1846
'new command.')
1947

20-
# Long term retention command argument changes
48+
# Long term retention command group deprecated with no redirect as the functionality will be removed in the future
2149
register_command_group_deprecate(command_group='postgres flexible-server long-term-retention',
2250
message='Long term retention command group will be removed. '
2351
'For more information, open a support incident.')

0 commit comments

Comments
 (0)