@@ -340,7 +340,7 @@ def pg_arguments_validator(db_context, location, tier, sku_name, storage_gb, ser
340340 else :
341341 supported_storageV2_size = None
342342 _pg_storage_type_validator (storage_type , auto_grow , high_availability , geo_redundant_backup , performance_tier ,
343- supported_storageV2_size , iops , throughput , instance )
343+ tier , supported_storageV2_size , iops , throughput , instance )
344344 _pg_storage_performance_tier_validator (performance_tier ,
345345 sku_info ,
346346 tier ,
@@ -905,7 +905,7 @@ def validate_identities(cmd, namespace):
905905 namespace .identities = [_validate_identity (cmd , namespace , identity ) for identity in namespace .identities ]
906906
907907
908- def _pg_storage_type_validator (storage_type , auto_grow , high_availability , geo_redundant_backup , performance_tier ,
908+ def _pg_storage_type_validator (storage_type , auto_grow , high_availability , geo_redundant_backup , performance_tier , tier ,
909909 supported_storageV2_size , iops , throughput , instance ):
910910 is_create_ssdv2 = storage_type == "PremiumV2_LRS"
911911 is_update_ssdv2 = instance is not None and instance .storage .type == "PremiumV2_LRS"
@@ -928,13 +928,22 @@ def _pg_storage_type_validator(storage_type, auto_grow, high_availability, geo_r
928928 raise ValidationError ("Geo-redundancy is not supported for servers with Premium SSD V2." )
929929 if performance_tier :
930930 raise ValidationError ("Performance tier is not supported for servers with Premium SSD V2." )
931+ if tier and tier .lower () == 'burstable' :
932+ raise ValidationError ("Burstable tier is not supported for servers with Premium SSD V2." )
931933 else :
932934 if throughput is not None :
933935 raise CLIError ('Updating throughput is only capable for server created with Premium SSD v2.' )
934936 if iops is not None :
935937 raise CLIError ('Updating storage iops is only capable for server created with Premium SSD v2.' )
936938
937939
940+ def pg_restore_validator (compute_tier , ** args ):
941+ is_ssdv2_enabled = args .get ('storage_type' , None ) == "PremiumV2_LRS"
942+
943+ if is_ssdv2_enabled and compute_tier .lower () == 'burstable' :
944+ raise ValidationError ("Burstable tier is not supported for servers with Premium SSD V2." )
945+
946+
938947def _pg_authentication_validator (password_auth , is_microsoft_entra_auth_enabled ,
939948 admin_name , admin_id , admin_type , instance ):
940949 if instance is None :
0 commit comments