-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[POSTGRESQL] as postgresql flexible-server replica create: Select storage type PremiumV2_LRS for replica server
#33134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -33,7 +33,7 @@ def flexible_replica_create(cmd, client, resource_group_name, source_server, rep | |||||||||||||||||||||||
| location=None, vnet=None, vnet_address_prefix=None, subnet=None, | ||||||||||||||||||||||||
| subnet_address_prefix=None, private_dns_zone_arguments=None, no_wait=False, | ||||||||||||||||||||||||
| byok_identity=None, byok_key=None, | ||||||||||||||||||||||||
| sku_name=None, tier=None, | ||||||||||||||||||||||||
| sku_name=None, tier=None, storage_type=None, | ||||||||||||||||||||||||
| storage_gb=None, performance_tier=None, yes=False, tags=None): | ||||||||||||||||||||||||
| validate_resource_group(resource_group_name) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
@@ -119,7 +119,7 @@ def flexible_replica_create(cmd, client, resource_group_name, source_server, rep | |||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| parameters.sku = postgresql_flexibleservers.models.Sku(name=sku_name, tier=tier) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| parameters.storage = postgresql_flexibleservers.models.Storage(storage_size_gb=storage_gb, auto_grow=source_server_object.storage.auto_grow, tier=performance_tier) | ||||||||||||||||||||||||
| parameters.storage = postgresql_flexibleservers.models.Storage(storage_size_gb=storage_gb, auto_grow=source_server_object.storage.auto_grow, tier=performance_tier, type=storage_type) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
Comment on lines
+122
to
123
|
||||||||||||||||||||||||
| parameters.storage = postgresql_flexibleservers.models.Storage(storage_size_gb=storage_gb, auto_grow=source_server_object.storage.auto_grow, tier=performance_tier, type=storage_type) | |
| storage_auto_grow = source_server_object.storage.auto_grow | |
| storage_performance_tier = performance_tier | |
| if storage_type == 'PremiumV2_LRS': | |
| storage_auto_grow = 'Disabled' | |
| storage_performance_tier = None | |
| parameters.storage = postgresql_flexibleservers.models.Storage(storage_size_gb=storage_gb, | |
| auto_grow=storage_auto_grow, | |
| tier=storage_performance_tier, | |
| type=storage_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replica create adds
--storage-type PremiumV2_LRS, but this command does not currently expose--iops/--throughput(which are required for PremiumV2 in the existing storage validators) and still allows--performance-tier(which PremiumV2 disallows). Either add the missing arguments and hook them into replica validation, or explicitly block incompatible combinations so users don’t hit avoidable service-side validation errors.