From 0ca7dd6f7f9386d65056c7c52a8d7787c2110778 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 15 Mar 2018 07:22:51 -0500 Subject: [PATCH] Hqndling the location being nil for legacy resources Fixes #678 --- azurerm/resource_arm_sql_elasticpool.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azurerm/resource_arm_sql_elasticpool.go b/azurerm/resource_arm_sql_elasticpool.go index 7be46f492c81..c855b0dbe3fd 100644 --- a/azurerm/resource_arm_sql_elasticpool.go +++ b/azurerm/resource_arm_sql_elasticpool.go @@ -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 {