fixed nil check in resourceArmVirtualMachineStorageOsDiskHash

This commit is contained in:
Brandon Tosch 2017-03-01 18:30:53 -08:00
parent 637915337f
commit 909976eebe
1 changed files with 2 additions and 2 deletions

View File

@ -808,8 +808,8 @@ func resourceArmVirtualMachineStorageOsDiskHash(v interface{}) int {
if m["vhd_uri"] != nil { if m["vhd_uri"] != nil {
buf.WriteString(fmt.Sprintf("%s-", m["vhd_uri"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["vhd_uri"].(string)))
} }
if m["managed_disk"] != nil { managedDisk := m["managed_disk"].(map[string]interface{})
managedDisk := m["managed_disk"].(map[string]interface{}) if managedDisk["storage_account_type"] != nil {
buf.WriteString(fmt.Sprintf("%s-", managedDisk["storage_account_type"].(string))) buf.WriteString(fmt.Sprintf("%s-", managedDisk["storage_account_type"].(string)))
} }
return hashcode.String(buf.String()) return hashcode.String(buf.String())