Skip to content

Commit

Permalink
Updated check for unmanaged disks and name property
Browse files Browse the repository at this point in the history
  • Loading branch information
echuvyrov committed Jun 25, 2017
1 parent c9002ac commit 31d33a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions azurerm/resource_arm_virtual_machine_scale_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,10 @@ func expandAzureRMVirtualMachineScaleSetsStorageProfileOsDisk(d *schema.Resource
createOption := osDiskConfig["create_option"].(string)
managedDiskType := osDiskConfig["managed_disk_type"].(string)

if managedDiskType == "" && name == "" {
return nil, fmt.Errorf("[ERROR] `name` must be set in `storage_profile_os_disk` for unmanaged disk")
}

osDisk := &compute.VirtualMachineScaleSetOSDisk{
Name: &name,
Caching: compute.CachingTypes(caching),
Expand Down

0 comments on commit 31d33a1

Please sign in to comment.