diff --git a/azurerm/resource_arm_mssql_elasticpool.go b/azurerm/resource_arm_mssql_elasticpool.go index 88679557d613..f1c4a2c785fc 100644 --- a/azurerm/resource_arm_mssql_elasticpool.go +++ b/azurerm/resource_arm_mssql_elasticpool.go @@ -177,7 +177,6 @@ func resourceArmMsSqlElasticPool() *schema.Resource { "zone_redundant": { Type: schema.TypeBool, Optional: true, - Default: false, }, "tags": tagsSchema(), @@ -203,7 +202,6 @@ func resourceArmMsSqlElasticPoolCreateUpdate(d *schema.ResourceData, meta interf elasticPoolName := d.Get("name").(string) serverName := d.Get("server_name").(string) resGroup := d.Get("resource_group_name").(string) - zoneredundant := d.Get("zone_redundant").(bool) if requireResourcesToBeImported && d.IsNewResource() { existing, err := client.Get(ctx, resGroup, serverName, elasticPoolName) @@ -229,10 +227,14 @@ func resourceArmMsSqlElasticPoolCreateUpdate(d *schema.ResourceData, meta interf Tags: expandTags(tags), ElasticPoolProperties: &sql.ElasticPoolProperties{ PerDatabaseSettings: expandAzureRmMsSqlElasticPoolPerDatabaseSettings(d), - ZoneRedundant: &zoneredundant, }, } + if v, ok := d.GetOkExists("zone_redundant"); ok { + zoneRedundant := v.(bool) + elasticPool.ElasticPoolProperties.ZoneRedundant = &zoneRedundant + } + if d.HasChange("max_size_gb") { if v, ok := d.GetOk("max_size_gb"); ok { maxSizeBytes := v.(float64) * 1073741824 diff --git a/azurerm/resource_arm_mssql_elasticpool_test.go b/azurerm/resource_arm_mssql_elasticpool_test.go index 82dc77ef650d..d080b00149cd 100644 --- a/azurerm/resource_arm_mssql_elasticpool_test.go +++ b/azurerm/resource_arm_mssql_elasticpool_test.go @@ -506,8 +506,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_gb = %.7[6]f - zone_redundant = %[9]t + max_size_gb = %.7[6]f + zone_redundant = %[9]t sku { name = "%[3]s"