Skip to content

Commit

Permalink
Bugfix: Fixes the acceptance tests for resource_arm_dev_test_*_virtua…
Browse files Browse the repository at this point in the history
…l_machine_test.go (#3717)
  • Loading branch information
kmsisco authored and katbyte committed Jul 30, 2019
1 parent cce1d8c commit 350ed10
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions azurerm/resource_arm_dev_test_virtual_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 350ed10

Please sign in to comment.