Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_sql_database - fix #4196 by ensuring read_scale is always set during initial creation #4573

Merged
merged 1 commit into from
Oct 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions azurerm/resource_arm_sql_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down