Skip to content

Commit

Permalink
Ensuring we always set the vhd_containers field (#1411)
Browse files Browse the repository at this point in the history
Fixes #1043
  • Loading branch information
tombuildsstuff authored Jul 3, 2018
1 parent 7c90c01 commit 00f3614
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azurerm/resource_arm_virtual_machine_scale_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -1193,13 +1193,13 @@ func flattenAzureRmVirtualMachineScaleSetStorageProfileOSDisk(profile *compute.V
result["image"] = *profile.Image.URI
}

containers := make([]interface{}, 0)
if profile.VhdContainers != nil {
containers := make([]interface{}, 0, len(*profile.VhdContainers))
for _, container := range *profile.VhdContainers {
containers = append(containers, container)
}
result["vhd_containers"] = schema.NewSet(schema.HashString, containers)
}
result["vhd_containers"] = schema.NewSet(schema.HashString, containers)

if profile.ManagedDisk != nil {
result["managed_disk_type"] = string(profile.ManagedDisk.StorageAccountType)
Expand Down

0 comments on commit 00f3614

Please sign in to comment.