diff --git a/azurerm/resource_arm_dev_test_virtual_network.go b/azurerm/resource_arm_dev_test_virtual_network.go index 900c010a1a18..bba44e9c90c7 100644 --- a/azurerm/resource_arm_dev_test_virtual_network.go +++ b/azurerm/resource_arm_dev_test_virtual_network.go @@ -116,7 +116,7 @@ func resourceArmDevTestVirtualNetworkCreate(d *schema.ResourceData, meta interfa subscriptionId := meta.(*ArmClient).subscriptionId subnetsRaw := d.Get("subnet").([]interface{}) - subnets := expandDevTestVirtualNetworkSubnets(subnetsRaw, subscriptionId, resourceGroup, labName, name) + subnets := expandDevTestVirtualNetworkSubnets(subnetsRaw, subscriptionId, resourceGroup, name) parameters := dtl.VirtualNetwork{ Tags: expandTags(tags), @@ -208,7 +208,7 @@ func resourceArmDevTestVirtualNetworkUpdate(d *schema.ResourceData, meta interfa subscriptionId := meta.(*ArmClient).subscriptionId subnetsRaw := d.Get("subnet").([]interface{}) - subnets := expandDevTestVirtualNetworkSubnets(subnetsRaw, subscriptionId, resourceGroup, labName, name) + subnets := expandDevTestVirtualNetworkSubnets(subnetsRaw, subscriptionId, resourceGroup, name) parameters := dtl.VirtualNetwork{ Tags: expandTags(tags), @@ -282,12 +282,12 @@ func validateDevTestVirtualNetworkName() schema.SchemaValidateFunc { "Virtual Network Name can only include alphanumeric characters, underscores, hyphens.") } -func expandDevTestVirtualNetworkSubnets(input []interface{}, subscriptionId, resourceGroupName, labName, virtualNetworkName string) *[]dtl.SubnetOverride { +func expandDevTestVirtualNetworkSubnets(input []interface{}, subscriptionId, resourceGroupName, virtualNetworkName string) *[]dtl.SubnetOverride { results := make([]dtl.SubnetOverride, 0) // default found from the Portal name := fmt.Sprintf("%sSubnet", virtualNetworkName) - idFmt := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DevTestLab/labs/%s/virtualnetworks/%s/subnets/%s" - subnetId := fmt.Sprintf(idFmt, subscriptionId, resourceGroupName, labName, virtualNetworkName, name) + idFmt := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets/%s" + subnetId := fmt.Sprintf(idFmt, subscriptionId, resourceGroupName, virtualNetworkName, name) if len(input) == 0 { result := dtl.SubnetOverride{ ResourceID: utils.String(subnetId),