From 9b4286e098f9981116e05263cf24ec89c8a20782 Mon Sep 17 00:00:00 2001 From: Raphael Couto Date: Fri, 16 Nov 2018 20:26:52 -0200 Subject: [PATCH 1/8] Including set max_size_bytes --- azurerm/resource_arm_mssql_elasticpool.go | 14 ++++++++++++-- azurerm/resource_arm_mssql_elasticpool_test.go | 4 +++- website/docs/r/mssql_elasticpool.html.markdown | 3 +++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/azurerm/resource_arm_mssql_elasticpool.go b/azurerm/resource_arm_mssql_elasticpool.go index b502629b17e6..4d618273fc1d 100644 --- a/azurerm/resource_arm_mssql_elasticpool.go +++ b/azurerm/resource_arm_mssql_elasticpool.go @@ -153,6 +153,12 @@ func resourceArmMsSqlElasticPool() *schema.Resource { }, "tags": tagsSchema(), + + "max_size_bytes": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntAtLeast(0), + }, }, CustomizeDiff: func(diff *schema.ResourceDiff, v interface{}) error { @@ -313,7 +319,7 @@ func resourceArmMsSqlElasticPoolRead(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("Error setting `sku`: %+v", err) } - if err := d.Set("elastic_pool_properties", flattenAzureRmMsSqlElasticPoolProperties(resp.ElasticPoolProperties)); err != nil { + if err := d.Set("elastic_pool_properties", flattenAzureRmMsSqlElasticPoolProperties(d, resp.ElasticPoolProperties)); err != nil { return fmt.Errorf("Error setting `elastic_pool_properties`: %+v", err) } @@ -355,11 +361,14 @@ func expandAzureRmMsSqlElasticPoolProperties(d *schema.ResourceData) *sql.Elasti minCapacity := perDatabaseSetting["min_capacity"].(float64) maxCapacity := perDatabaseSetting["max_capacity"].(float64) + maxSizeBytes := int64(d.Get("max_size_bytes").(int)) + return &sql.ElasticPoolProperties{ PerDatabaseSettings: &sql.ElasticPoolPerDatabaseSettings{ MinCapacity: utils.Float(minCapacity), MaxCapacity: utils.Float(maxCapacity), }, + MaxSizeBytes: utils.Int64(maxSizeBytes), } } @@ -402,11 +411,12 @@ func flattenAzureRmMsSqlElasticPoolSku(resp *sql.Sku) []interface{} { return []interface{}{values} } -func flattenAzureRmMsSqlElasticPoolProperties(resp *sql.ElasticPoolProperties) []interface{} { +func flattenAzureRmMsSqlElasticPoolProperties(d *schema.ResourceData, resp *sql.ElasticPoolProperties) []interface{} { elasticPoolProperty := map[string]interface{}{} if maxSizeBytes := resp.MaxSizeBytes; maxSizeBytes != nil { elasticPoolProperty["max_size_bytes"] = *maxSizeBytes + d.Set("max_size_bytes", *maxSizeBytes) } elasticPoolProperty["state"] = string(resp.State) diff --git a/azurerm/resource_arm_mssql_elasticpool_test.go b/azurerm/resource_arm_mssql_elasticpool_test.go index 934fd8d15243..b24566b55b25 100644 --- a/azurerm/resource_arm_mssql_elasticpool_test.go +++ b/azurerm/resource_arm_mssql_elasticpool_test.go @@ -289,6 +289,7 @@ resource "azurerm_mssql_elasticpool" "test" { resource_group_name = "${azurerm_resource_group.test.name}" location = "${azurerm_resource_group.test.location}" server_name = "${azurerm_sql_server.test.name}" + max_size_bytes = 5368709120 sku { name = "%[3]s" @@ -326,7 +327,8 @@ resource "azurerm_mssql_elasticpool" "test" { resource_group_name = "${azurerm_resource_group.test.name}" location = "${azurerm_resource_group.test.location}" server_name = "${azurerm_sql_server.test.name}" - + max_size_bytes = 5368709120 + sku { name = "%[3]s" tier = "%[4]s" diff --git a/website/docs/r/mssql_elasticpool.html.markdown b/website/docs/r/mssql_elasticpool.html.markdown index 0559157baa36..eeca64a758f3 100644 --- a/website/docs/r/mssql_elasticpool.html.markdown +++ b/website/docs/r/mssql_elasticpool.html.markdown @@ -32,6 +32,7 @@ resource "azurerm_mssql_elasticpool" "test" { resource_group_name = "${azurerm_resource_group.test.name}" location = "${azurerm_resource_group.test.location}" server_name = "${azurerm_sql_server.test.name}" + max_size_bytes = 5368709120 sku { name = "GP_Gen5" @@ -63,6 +64,8 @@ The following arguments are supported: * `per_database_settings` - (Required) A `per_database_settings` block as defined below. +* `max_size_bytes` - (Required) The max data size of the elastic pool. + * `tags` - (Optional) A mapping of tags to assign to the resource. --- From ac668c27c02e463aa50e240756f4815d4a2cb059 Mon Sep 17 00:00:00 2001 From: Raphael Couto Date: Thu, 22 Nov 2018 12:28:16 -0200 Subject: [PATCH 2/8] Move lines --- azurerm/resource_arm_mssql_elasticpool.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azurerm/resource_arm_mssql_elasticpool.go b/azurerm/resource_arm_mssql_elasticpool.go index 4d618273fc1d..3d4fda443744 100644 --- a/azurerm/resource_arm_mssql_elasticpool.go +++ b/azurerm/resource_arm_mssql_elasticpool.go @@ -152,13 +152,14 @@ func resourceArmMsSqlElasticPool() *schema.Resource { }, }, - "tags": tagsSchema(), - "max_size_bytes": { Type: schema.TypeInt, Required: true, ValidateFunc: validation.IntAtLeast(0), }, + + "tags": tagsSchema(), + }, CustomizeDiff: func(diff *schema.ResourceDiff, v interface{}) error { From 9b0e01cad0d6c0b2d8ac7675c967eec8ee364b94 Mon Sep 17 00:00:00 2001 From: Raphael Couto Date: Thu, 22 Nov 2018 14:54:00 -0200 Subject: [PATCH 3/8] fix fmt --- azurerm/resource_arm_mssql_elasticpool.go | 1 - 1 file changed, 1 deletion(-) diff --git a/azurerm/resource_arm_mssql_elasticpool.go b/azurerm/resource_arm_mssql_elasticpool.go index 3d4fda443744..646c93868d27 100644 --- a/azurerm/resource_arm_mssql_elasticpool.go +++ b/azurerm/resource_arm_mssql_elasticpool.go @@ -159,7 +159,6 @@ func resourceArmMsSqlElasticPool() *schema.Resource { }, "tags": tagsSchema(), - }, CustomizeDiff: func(diff *schema.ResourceDiff, v interface{}) error { From 2ddf7784637f77d59b58b666b4790b7375e7aa34 Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 10 Jan 2019 17:12:29 -0800 Subject: [PATCH 4/8] cleanup after merge --- azurerm/resource_arm_mssql_elasticpool.go | 11 +++-------- azurerm/resource_arm_mssql_elasticpool_test.go | 10 +++++----- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/azurerm/resource_arm_mssql_elasticpool.go b/azurerm/resource_arm_mssql_elasticpool.go index a0c1623d7fdf..2a20210fc927 100644 --- a/azurerm/resource_arm_mssql_elasticpool.go +++ b/azurerm/resource_arm_mssql_elasticpool.go @@ -164,7 +164,6 @@ func resourceArmMsSqlElasticPool() *schema.Resource { ValidateFunc: validation.IntAtLeast(0), }, - "zone_redundant": { Type: schema.TypeBool, Computed: true, @@ -267,6 +266,7 @@ func resourceArmMsSqlElasticPoolCreateUpdate(d *schema.ResourceData, meta interf location := azureRMNormalizeLocation(d.Get("location").(string)) resGroup := d.Get("resource_group_name").(string) sku := expandAzureRmMsSqlElasticPoolSku(d) + maxSize := d.Get("max_size_bytes").(int) tags := d.Get("tags").(map[string]interface{}) elasticPool := sql.ElasticPool{ @@ -276,6 +276,7 @@ func resourceArmMsSqlElasticPoolCreateUpdate(d *schema.ResourceData, meta interf Tags: expandTags(tags), ElasticPoolProperties: &sql.ElasticPoolProperties{ PerDatabaseSettings: expandAzureRmMsSqlElasticPoolPerDatabaseSettings(d), + MaxSizeBytes: utils.Int64(int64(maxSize)), }, } @@ -425,14 +426,8 @@ func flattenAzureRmMsSqlElasticPoolSku(resp *sql.Sku) []interface{} { return []interface{}{values} } -func flattenAzureRmMsSqlElasticPoolProperties(d *schema.ResourceData, resp *sql.ElasticPoolProperties) []interface{} { +func flattenAzureRmMsSqlElasticPoolProperties(resp *sql.ElasticPoolProperties) []interface{} { elasticPoolProperty := map[string]interface{}{} - - if maxSizeBytes := resp.MaxSizeBytes; maxSizeBytes != nil { - elasticPoolProperty["max_size_bytes"] = *maxSizeBytes - d.Set("max_size_bytes", *maxSizeBytes) - } - elasticPoolProperty["state"] = string(resp.State) if date := resp.CreationDate; date != nil { diff --git a/azurerm/resource_arm_mssql_elasticpool_test.go b/azurerm/resource_arm_mssql_elasticpool_test.go index a7ca7ee376d0..a9d8c214e093 100644 --- a/azurerm/resource_arm_mssql_elasticpool_test.go +++ b/azurerm/resource_arm_mssql_elasticpool_test.go @@ -15,7 +15,7 @@ func TestAccAzureRMMsSqlElasticPool_basic_DTU(t *testing.T) { ri := acctest.RandInt() config := testAccAzureRMMsSqlElasticPool_basic_DTU(ri, testLocation()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testCheckAzureRMMsSqlElasticPoolDestroy, @@ -47,7 +47,7 @@ func TestAccAzureRMMsSqlElasticPool_basic_vCore(t *testing.T) { ri := acctest.RandInt() config := testAccAzureRMMsSqlElasticPool_basic_vCore(ri, testLocation()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testCheckAzureRMMsSqlElasticPoolDestroy, @@ -80,7 +80,7 @@ func TestAccAzureRMMsSqlElasticPool_disappears(t *testing.T) { ri := acctest.RandInt() config := testAccAzureRMMsSqlElasticPool_basic_DTU(ri, testLocation()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testCheckAzureRMMsSqlElasticPoolDestroy, @@ -109,7 +109,7 @@ func TestAccAzureRMMsSqlElasticPool_resize_DTU(t *testing.T) { preConfig := testAccAzureRMMsSqlElasticPool_basic_DTU(ri, location) postConfig := testAccAzureRMMsSqlElasticPool_resize_DTU(ri, location) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testCheckAzureRMMsSqlElasticPoolDestroy, @@ -147,7 +147,7 @@ func TestAccAzureRMMsSqlElasticPool_resize_vCore(t *testing.T) { preConfig := testAccAzureRMMsSqlElasticPool_basic_vCore(ri, location) postConfig := testAccAzureRMMsSqlElasticPool_resize_vCore(ri, location) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testCheckAzureRMMsSqlElasticPoolDestroy, From 91b361807da6c16333c2a41d37f773de1855ffcd Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 10 Jan 2019 17:26:44 -0800 Subject: [PATCH 5/8] made max_size_bytes optional --- azurerm/resource_arm_mssql_elasticpool.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/azurerm/resource_arm_mssql_elasticpool.go b/azurerm/resource_arm_mssql_elasticpool.go index 2a20210fc927..e3fc1cc1f3db 100644 --- a/azurerm/resource_arm_mssql_elasticpool.go +++ b/azurerm/resource_arm_mssql_elasticpool.go @@ -160,7 +160,8 @@ func resourceArmMsSqlElasticPool() *schema.Resource { "max_size_bytes": { Type: schema.TypeInt, - Required: true, + Optional: true, + Computed: true, ValidateFunc: validation.IntAtLeast(0), }, @@ -266,7 +267,6 @@ func resourceArmMsSqlElasticPoolCreateUpdate(d *schema.ResourceData, meta interf location := azureRMNormalizeLocation(d.Get("location").(string)) resGroup := d.Get("resource_group_name").(string) sku := expandAzureRmMsSqlElasticPoolSku(d) - maxSize := d.Get("max_size_bytes").(int) tags := d.Get("tags").(map[string]interface{}) elasticPool := sql.ElasticPool{ @@ -276,10 +276,13 @@ func resourceArmMsSqlElasticPoolCreateUpdate(d *schema.ResourceData, meta interf Tags: expandTags(tags), ElasticPoolProperties: &sql.ElasticPoolProperties{ PerDatabaseSettings: expandAzureRmMsSqlElasticPoolPerDatabaseSettings(d), - MaxSizeBytes: utils.Int64(int64(maxSize)), }, } + if v, ok := d.GetOk("max_size_bytes"); ok { + elasticPool.MaxSizeBytes = utils.Int64(int64(v.(int))) + } + future, err := client.CreateOrUpdate(ctx, resGroup, serverName, elasticPoolName, elasticPool) if err != nil { return err From 1feff95f4474429c82292deaffdab40e9e9485ec Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 10 Jan 2019 19:29:28 -0800 Subject: [PATCH 6/8] update docs --- website/docs/r/mssql_elasticpool.html.markdown | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/website/docs/r/mssql_elasticpool.html.markdown b/website/docs/r/mssql_elasticpool.html.markdown index 315cba15b735..e36bf783a163 100644 --- a/website/docs/r/mssql_elasticpool.html.markdown +++ b/website/docs/r/mssql_elasticpool.html.markdown @@ -64,7 +64,7 @@ The following arguments are supported: * `per_database_settings` - (Required) A `per_database_settings` block as defined below. -* `max_size_bytes` - (Required) The max data size of the elastic pool. +* `max_size_bytes` - (Optional) The max data size of the elastic pool in bytes. * `tags` - (Optional) A mapping of tags to assign to the resource. @@ -96,8 +96,6 @@ The following attributes are exported: * `id` - The MsSQL Elastic Pool ID. -* `max_size_bytes` - The storage limit for the database elastic pool in bytes. - * `zone_redundant` - Whether or not this elastic pool is zone redundant. ## Import From 411edc7e43c925e9a8017c6599fa58e63aad4eb2 Mon Sep 17 00:00:00 2001 From: Jeffrey Cline Date: Fri, 11 Jan 2019 18:57:21 -0800 Subject: [PATCH 7/8] Added test for Basic tier and corrected max_size_byte values --- .../resource_arm_mssql_elasticpool_test.go | 49 +++++++++++++++---- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/azurerm/resource_arm_mssql_elasticpool_test.go b/azurerm/resource_arm_mssql_elasticpool_test.go index a9d8c214e093..2148e9180f89 100644 --- a/azurerm/resource_arm_mssql_elasticpool_test.go +++ b/azurerm/resource_arm_mssql_elasticpool_test.go @@ -15,6 +15,33 @@ func TestAccAzureRMMsSqlElasticPool_basic_DTU(t *testing.T) { ri := acctest.RandInt() config := testAccAzureRMMsSqlElasticPool_basic_DTU(ri, testLocation()) + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testCheckAzureRMMsSqlElasticPoolDestroy, + Steps: []resource.TestStep{ + { + Config: config, + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMMsSqlElasticPoolExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "sku.0.name", "BasicPool"), + resource.TestCheckResourceAttr(resourceName, "sku.0.tier", "Basic"), + resource.TestCheckResourceAttr(resourceName, "sku.0.capacity", "50"), + resource.TestCheckResourceAttr(resourceName, "per_database_settings.0.min_capacity", "0"), + resource.TestCheckResourceAttr(resourceName, "per_database_settings.0.max_capacity", "5"), + resource.TestCheckResourceAttrSet(resourceName, "max_size_bytes"), + resource.TestCheckResourceAttrSet(resourceName, "zone_redundant"), + ), + }, + }, + }) +} + +func TestAccAzureRMMsSqlElasticPool_standard_DTU(t *testing.T) { + resourceName := "azurerm_mssql_elasticpool.test" + ri := acctest.RandInt() + config := testAccAzureRMMsSqlElasticPool_standard_DTU(ri, testLocation()) + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -78,7 +105,7 @@ func TestAccAzureRMMsSqlElasticPool_basic_vCore(t *testing.T) { func TestAccAzureRMMsSqlElasticPool_disappears(t *testing.T) { resourceName := "azurerm_mssql_elasticpool.test" ri := acctest.RandInt() - config := testAccAzureRMMsSqlElasticPool_basic_DTU(ri, testLocation()) + config := testAccAzureRMMsSqlElasticPool_standard_DTU(ri, testLocation()) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -106,7 +133,7 @@ func TestAccAzureRMMsSqlElasticPool_resize_DTU(t *testing.T) { resourceName := "azurerm_mssql_elasticpool.test" ri := acctest.RandInt() location := testLocation() - preConfig := testAccAzureRMMsSqlElasticPool_basic_DTU(ri, location) + preConfig := testAccAzureRMMsSqlElasticPool_standard_DTU(ri, location) postConfig := testAccAzureRMMsSqlElasticPool_resize_DTU(ri, location) resource.ParallelTest(t, resource.TestCase{ @@ -257,11 +284,15 @@ func testCheckAzureRMMsSqlElasticPoolDisappears(resourceName string) resource.Te } func testAccAzureRMMsSqlElasticPool_basic_DTU(rInt int, location string) string { - return testAccAzureRMMsSqlElasticPool_DTU_Template(rInt, location, "StandardPool", "Standard", 50, 0, 50) + return testAccAzureRMMsSqlElasticPool_DTU_Template(rInt, location, "BasicPool", "Basic", 50, 5242880000, 0, 5) +} + +func testAccAzureRMMsSqlElasticPool_standard_DTU(rInt int, location string) string { + return testAccAzureRMMsSqlElasticPool_DTU_Template(rInt, location, "StandardPool", "Standard", 50, 53687091200, 0, 50) } func testAccAzureRMMsSqlElasticPool_resize_DTU(rInt int, location string) string { - return testAccAzureRMMsSqlElasticPool_DTU_Template(rInt, location, "StandardPool", "Standard", 100, 50, 100) + return testAccAzureRMMsSqlElasticPool_DTU_Template(rInt, location, "StandardPool", "Standard", 100, 107374182400, 50, 100) } func testAccAzureRMMsSqlElasticPool_basic_vCore(rInt int, location string) string { @@ -310,7 +341,7 @@ resource "azurerm_mssql_elasticpool" "test" { `, rInt, location, skuName, skuTier, skuCapacity, skuFamily, databaseSettingsMin, databaseSettingsMax) } -func testAccAzureRMMsSqlElasticPool_DTU_Template(rInt int, location string, skuName string, skuTier string, skuCapacity int, databaseSettingsMin int, databaseSettingsMax int) string { +func testAccAzureRMMsSqlElasticPool_DTU_Template(rInt int, location string, skuName string, skuTier string, skuCapacity int, maxSizeBytes int, databaseSettingsMin int, databaseSettingsMax int) string { return fmt.Sprintf(` resource "azurerm_resource_group" "test" { name = "acctestRG-%[1]d" @@ -331,7 +362,7 @@ resource "azurerm_mssql_elasticpool" "test" { resource_group_name = "${azurerm_resource_group.test.name}" location = "${azurerm_resource_group.test.location}" server_name = "${azurerm_sql_server.test.name}" - max_size_bytes = 5368709120 + max_size_bytes = %[6]d sku { name = "%[3]s" @@ -340,9 +371,9 @@ resource "azurerm_mssql_elasticpool" "test" { } per_database_settings { - min_capacity = %[6]d - max_capacity = %[7]d + min_capacity = %[7]d + max_capacity = %[8]d } } -`, rInt, location, skuName, skuTier, skuCapacity, databaseSettingsMin, databaseSettingsMax) +`, rInt, location, skuName, skuTier, skuCapacity, maxSizeBytes, databaseSettingsMin, databaseSettingsMax) } From 7887d969f2e85d01a89b2cc051122387c9a3865b Mon Sep 17 00:00:00 2001 From: Jeffrey Cline Date: Fri, 11 Jan 2019 19:11:58 -0800 Subject: [PATCH 8/8] Updated test to us tf.AccRandTimeInt() --- azurerm/resource_arm_mssql_elasticpool_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/azurerm/resource_arm_mssql_elasticpool_test.go b/azurerm/resource_arm_mssql_elasticpool_test.go index 2148e9180f89..dc55f31faf54 100644 --- a/azurerm/resource_arm_mssql_elasticpool_test.go +++ b/azurerm/resource_arm_mssql_elasticpool_test.go @@ -5,14 +5,14 @@ import ( "net/http" "testing" - "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" ) func TestAccAzureRMMsSqlElasticPool_basic_DTU(t *testing.T) { resourceName := "azurerm_mssql_elasticpool.test" - ri := acctest.RandInt() + ri := tf.AccRandTimeInt() config := testAccAzureRMMsSqlElasticPool_basic_DTU(ri, testLocation()) resource.ParallelTest(t, resource.TestCase{ @@ -39,7 +39,7 @@ func TestAccAzureRMMsSqlElasticPool_basic_DTU(t *testing.T) { func TestAccAzureRMMsSqlElasticPool_standard_DTU(t *testing.T) { resourceName := "azurerm_mssql_elasticpool.test" - ri := acctest.RandInt() + ri := tf.AccRandTimeInt() config := testAccAzureRMMsSqlElasticPool_standard_DTU(ri, testLocation()) resource.ParallelTest(t, resource.TestCase{ @@ -71,7 +71,7 @@ func TestAccAzureRMMsSqlElasticPool_standard_DTU(t *testing.T) { func TestAccAzureRMMsSqlElasticPool_basic_vCore(t *testing.T) { resourceName := "azurerm_mssql_elasticpool.test" - ri := acctest.RandInt() + ri := tf.AccRandTimeInt() config := testAccAzureRMMsSqlElasticPool_basic_vCore(ri, testLocation()) resource.ParallelTest(t, resource.TestCase{ @@ -104,7 +104,7 @@ func TestAccAzureRMMsSqlElasticPool_basic_vCore(t *testing.T) { func TestAccAzureRMMsSqlElasticPool_disappears(t *testing.T) { resourceName := "azurerm_mssql_elasticpool.test" - ri := acctest.RandInt() + ri := tf.AccRandTimeInt() config := testAccAzureRMMsSqlElasticPool_standard_DTU(ri, testLocation()) resource.ParallelTest(t, resource.TestCase{ @@ -131,7 +131,7 @@ func TestAccAzureRMMsSqlElasticPool_disappears(t *testing.T) { func TestAccAzureRMMsSqlElasticPool_resize_DTU(t *testing.T) { resourceName := "azurerm_mssql_elasticpool.test" - ri := acctest.RandInt() + ri := tf.AccRandTimeInt() location := testLocation() preConfig := testAccAzureRMMsSqlElasticPool_standard_DTU(ri, location) postConfig := testAccAzureRMMsSqlElasticPool_resize_DTU(ri, location) @@ -169,7 +169,7 @@ func TestAccAzureRMMsSqlElasticPool_resize_DTU(t *testing.T) { func TestAccAzureRMMsSqlElasticPool_resize_vCore(t *testing.T) { resourceName := "azurerm_mssql_elasticpool.test" - ri := acctest.RandInt() + ri := tf.AccRandTimeInt() location := testLocation() preConfig := testAccAzureRMMsSqlElasticPool_basic_vCore(ri, location) postConfig := testAccAzureRMMsSqlElasticPool_resize_vCore(ri, location)