Skip to content

Commit

Permalink
Merge pull request #982 from terraform-providers/fix-elasticpool-crash
Browse files Browse the repository at this point in the history
`azurem_sql_elasticpool` - fixing a crash where `location` isn't returned for legacy resources
  • Loading branch information
tombuildsstuff authored Mar 15, 2018
2 parents 913bcd7 + 0ca7dd6 commit 3a5a6e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion azurerm/resource_arm_sql_elasticpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ func resourceArmSqlElasticPoolRead(d *schema.ResourceData, meta interface{}) err

d.Set("name", resp.Name)
d.Set("resource_group_name", resGroup)
d.Set("location", azureRMNormalizeLocation(*resp.Location))
if location := resp.Location; location != nil {
d.Set("location", azureRMNormalizeLocation(*location))
}
d.Set("server_name", serverName)

if elasticPool := resp.ElasticPoolProperties; elasticPool != nil {
Expand Down

0 comments on commit 3a5a6e6

Please sign in to comment.