From 8c678121e675048032535e4c3ecdf712a1312b80 Mon Sep 17 00:00:00 2001 From: Andreas Kyrris Date: Tue, 27 Sep 2016 17:54:08 +0100 Subject: [PATCH] Fix import of resource group name for azurerm_network_security_group. --- .../azurerm/import_arm_network_security_group_test.go | 7 +++---- .../azurerm/resource_arm_network_security_group.go | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/providers/azurerm/import_arm_network_security_group_test.go b/builtin/providers/azurerm/import_arm_network_security_group_test.go index 70ed829c0..fa1884809 100644 --- a/builtin/providers/azurerm/import_arm_network_security_group_test.go +++ b/builtin/providers/azurerm/import_arm_network_security_group_test.go @@ -19,10 +19,9 @@ func TestAccAzureRMNetworkSecurityGroup_importBasic(t *testing.T) { }, resource.TestStep{ - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"resource_group_name"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, }, }, }) diff --git a/builtin/providers/azurerm/resource_arm_network_security_group.go b/builtin/providers/azurerm/resource_arm_network_security_group.go index 11a67a76a..a0fe8895f 100644 --- a/builtin/providers/azurerm/resource_arm_network_security_group.go +++ b/builtin/providers/azurerm/resource_arm_network_security_group.go @@ -203,6 +203,7 @@ func resourceArmNetworkSecurityGroupRead(d *schema.ResourceData, meta interface{ d.Set("security_rule", flattenNetworkSecurityRules(resp.Properties.SecurityRules)) } + d.Set("resource_group_name", resGroup) d.Set("name", resp.Name) d.Set("location", resp.Location) flattenAndSetTags(d, resp.Tags)