Skip to content

Commit

Permalink
Changed zone name to be read correctly in google_compute_disk. (hashi…
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson authored and Dmitry Vlasov committed Aug 15, 2017
1 parent a742595 commit bcfa9e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion google/resource_compute_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,10 @@ func resourceComputeDiskDelete(d *schema.ResourceData, meta interface{}) error {
}
for _, disk := range i.Disks {
if disk.Source == self {
zoneParts := strings.Split(i.Zone, "/")
detachCalls = append(detachCalls, detachArgs{
project: project,
zone: i.Zone,
zone: zoneParts[len(zoneParts)-1],
instance: i.Name,
deviceName: disk.DeviceName,
})
Expand Down

0 comments on commit bcfa9e2

Please sign in to comment.