From eca05fe2152e92247ee9d0cb361fa94c38409eca Mon Sep 17 00:00:00 2001 From: kt Date: Thu, 22 Nov 2018 15:12:15 -0800 Subject: [PATCH] updates requested in pr #2378 --- azurerm/resource_arm_mssql_elasticpool.go | 26 +++---------------- .../resource_arm_mssql_elasticpool_test.go | 4 --- .../docs/r/mssql_elasticpool.html.markdown | 4 ++- 3 files changed, 6 insertions(+), 28 deletions(-) diff --git a/azurerm/resource_arm_mssql_elasticpool.go b/azurerm/resource_arm_mssql_elasticpool.go index ef59028af6002..aaf25385f1d36 100644 --- a/azurerm/resource_arm_mssql_elasticpool.go +++ b/azurerm/resource_arm_mssql_elasticpool.go @@ -2,11 +2,6 @@ package azurerm import ( "fmt" - "log" - "math" - "strings" - "time" - "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-10-01-preview/sql" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -14,6 +9,9 @@ import ( "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/suppress" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" + "log" + "math" + "strings" ) func resourceArmMsSqlElasticPool() *schema.Resource { @@ -159,16 +157,6 @@ func resourceArmMsSqlElasticPool() *schema.Resource { }, }, - "state": { - Type: schema.TypeString, - Computed: true, - }, - - "creation_date": { - Type: schema.TypeString, - Computed: true, - }, - "max_size_bytes": { Type: schema.TypeInt, Computed: true, @@ -179,11 +167,6 @@ func resourceArmMsSqlElasticPool() *schema.Resource { Computed: true, }, - "license_type": { - Type: schema.TypeString, - Computed: true, - }, - "tags": tagsSchema(), }, @@ -347,10 +330,7 @@ func resourceArmMsSqlElasticPoolRead(d *schema.ResourceData, meta interface{}) e } if properties := resp.ElasticPoolProperties; properties != nil { - d.Set("creation_date", properties.CreationDate.Format(time.RFC3339)) - d.Set("license_type", string(properties.LicenseType)) d.Set("max_size_bytes", properties.MaxSizeBytes) - d.Set("state", string(properties.State)) d.Set("zone_redundant", properties.ZoneRedundant) //todo remove in 2.0 diff --git a/azurerm/resource_arm_mssql_elasticpool_test.go b/azurerm/resource_arm_mssql_elasticpool_test.go index 61cdb56e066c3..aa7fbb026c5a9 100644 --- a/azurerm/resource_arm_mssql_elasticpool_test.go +++ b/azurerm/resource_arm_mssql_elasticpool_test.go @@ -29,9 +29,7 @@ func TestAccAzureRMMsSqlElasticPool_basic_DTU(t *testing.T) { 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", "50"), - resource.TestCheckResourceAttrSet(resourceName, "creation_date"), resource.TestCheckResourceAttrSet(resourceName, "max_size_bytes"), - resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "zone_redundant"), ), }, @@ -64,9 +62,7 @@ func TestAccAzureRMMsSqlElasticPool_basic_vCore(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "sku.0.family", "Gen5"), resource.TestCheckResourceAttr(resourceName, "per_database_settings.0.min_capacity", "0.25"), resource.TestCheckResourceAttr(resourceName, "per_database_settings.0.max_capacity", "4"), - resource.TestCheckResourceAttrSet(resourceName, "creation_date"), resource.TestCheckResourceAttrSet(resourceName, "max_size_bytes"), - resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "zone_redundant"), ), }, diff --git a/website/docs/r/mssql_elasticpool.html.markdown b/website/docs/r/mssql_elasticpool.html.markdown index 0559157baa361..1d2fe0088435e 100644 --- a/website/docs/r/mssql_elasticpool.html.markdown +++ b/website/docs/r/mssql_elasticpool.html.markdown @@ -93,7 +93,9 @@ The following attributes are exported: * `id` - The MsSQL Elastic Pool ID. -* `creation_date` - The creation date of the MsSQL Elastic Pool. +* `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