From 7e0f5587bf62518e621a6e02c2f0b1b2dd00bc69 Mon Sep 17 00:00:00 2001 From: Zhijie Huang Date: Wed, 9 Oct 2019 13:57:59 +0800 Subject: [PATCH] fix the bug that `read_scale` doesn't work --- azurerm/resource_arm_sql_database.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/azurerm/resource_arm_sql_database.go b/azurerm/resource_arm_sql_database.go index b083d97bb934..fd95f164e3b6 100644 --- a/azurerm/resource_arm_sql_database.go +++ b/azurerm/resource_arm_sql_database.go @@ -433,13 +433,11 @@ func resourceArmSqlDatabaseCreateUpdate(d *schema.ResourceData, meta interface{} } } - if v, ok := d.GetOk("read_scale"); ok { - readScale := v.(bool) - if readScale { - properties.DatabaseProperties.ReadScale = sql.ReadScaleEnabled - } else { - properties.DatabaseProperties.ReadScale = sql.ReadScaleDisabled - } + readScale := d.Get("read_scale").(bool) + if readScale { + properties.DatabaseProperties.ReadScale = sql.ReadScaleEnabled + } else { + properties.DatabaseProperties.ReadScale = sql.ReadScaleDisabled } // The requested Service Objective Name does not match the requested Service Objective Id.