@@ -308,15 +308,24 @@ func TestAccMsSqlElasticPool_hyperScale(t *testing.T) {
308308
309309 data .ResourceTest (t , r , []acceptance.TestStep {
310310 {
311- Config : r .hyperScale (data , "" ),
311+ Config : r .hyperScale (data , "" , 0 ),
312312 Check : acceptance .ComposeTestCheckFunc (
313313 check .That (data .ResourceName ).ExistsInAzure (r ),
314314 check .That (data .ResourceName ).Key ("enclave_type" ).IsEmpty (),
315+ check .That (data .ResourceName ).Key ("high_availability_replica_count" ).HasValue ("0" ),
315316 ),
316317 },
317318 data .ImportStep ("max_size_gb" ),
318319 {
319- Config : r .hyperScaleUpdate (data , `enclave_type = "VBS"` ),
320+ Config : r .hyperScaleUpdateReplicaCount (data , 1 ),
321+ Check : acceptance .ComposeTestCheckFunc (
322+ check .That (data .ResourceName ).ExistsInAzure (r ),
323+ check .That (data .ResourceName ).Key ("high_availability_replica_count" ).HasValue ("1" ),
324+ ),
325+ },
326+ data .ImportStep ("max_size_gb" ),
327+ {
328+ Config : r .hyperScaleUpdateEnclaveType (data , `enclave_type = "VBS"` , 1 ),
320329 Check : acceptance .ComposeTestCheckFunc (
321330 check .That (data .ResourceName ).ExistsInAzure (r ),
322331 check .That (data .ResourceName ).Key ("enclave_type" ).HasValue ("VBS" ),
@@ -837,10 +846,14 @@ resource "azurerm_mssql_elasticpool" "test" {
837846` , data .RandomInteger , data .Locations .Primary , licenseType , enclaveType )
838847}
839848
840- func (r MsSqlElasticPoolResource ) hyperScale (data acceptance.TestData , enclaveType string ) string {
841- return r .templateHyperScale (data , "HS_Gen5" , "Hyperscale" , 4 , "Gen5" , 0.25 , 4 , enclaveType , 1 )
849+ func (r MsSqlElasticPoolResource ) hyperScale (data acceptance.TestData , enclaveType string , highAvailabilityReplicaCount int ) string {
850+ return r .templateHyperScale (data , "HS_Gen5" , "Hyperscale" , 4 , "Gen5" , 0.25 , 4 , enclaveType , highAvailabilityReplicaCount )
851+ }
852+
853+ func (r MsSqlElasticPoolResource ) hyperScaleUpdateReplicaCount (data acceptance.TestData , highAvailabilityReplicaCount int ) string {
854+ return r .templateHyperScale (data , "HS_Gen5" , "Hyperscale" , 4 , "Gen5" , 0.25 , 4 , "" , highAvailabilityReplicaCount )
842855}
843856
844- func (r MsSqlElasticPoolResource ) hyperScaleUpdate (data acceptance.TestData , enclaveType string ) string {
845- return r .templateHyperScale (data , "HS_Gen5" , "Hyperscale" , 4 , "Gen5" , 0 , 4 , enclaveType , 0 )
857+ func (r MsSqlElasticPoolResource ) hyperScaleUpdateEnclaveType (data acceptance.TestData , enclaveType string , highAvailabilityReplicaCount int ) string {
858+ return r .templateHyperScale (data , "HS_Gen5" , "Hyperscale" , 4 , "Gen5" , 0 , 4 , enclaveType , highAvailabilityReplicaCount )
846859}
0 commit comments