From e60d5dd2607fc2afe9f7eea37eaced559d8835f6 Mon Sep 17 00:00:00 2001 From: Andreas Kyrris Date: Tue, 27 Sep 2016 17:45:43 +0100 Subject: [PATCH] Fix import of resource group name for azurerm_virtual_network. --- .../providers/azurerm/import_arm_virtual_network_test.go | 7 +++---- builtin/providers/azurerm/resource_arm_virtual_network.go | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/providers/azurerm/import_arm_virtual_network_test.go b/builtin/providers/azurerm/import_arm_virtual_network_test.go index d6e594e7a..1f06ca05d 100644 --- a/builtin/providers/azurerm/import_arm_virtual_network_test.go +++ b/builtin/providers/azurerm/import_arm_virtual_network_test.go @@ -24,10 +24,9 @@ func TestAccAzureRMVirtualNetwork_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_virtual_network.go b/builtin/providers/azurerm/resource_arm_virtual_network.go index 8c7ed205f..d944e788c 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_network.go +++ b/builtin/providers/azurerm/resource_arm_virtual_network.go @@ -142,6 +142,7 @@ func resourceArmVirtualNetworkRead(d *schema.ResourceData, meta interface{}) err vnet := *resp.Properties // update appropriate values + d.Set("resource_group_name", resGroup) d.Set("name", resp.Name) d.Set("location", resp.Location) d.Set("address_space", vnet.AddressSpace.AddressPrefixes)