provider/google: Update compute_disk to read after update, always set size (#15095)

This commit is contained in:
Clint 2017-06-06 09:44:23 -05:00 committed by GitHub
parent 258674a358
commit 3d1e60b504
2 changed files with 3 additions and 6 deletions

View File

@ -204,7 +204,7 @@ func resourceComputeDiskUpdate(d *schema.ResourceData, meta interface{}) error {
}
}
return nil
return resourceComputeDiskRead(d, meta)
}
func resourceComputeDiskRead(d *schema.ResourceData, meta interface{}) error {
@ -259,10 +259,7 @@ func resourceComputeDiskRead(d *schema.ResourceData, meta interface{}) error {
imageUrlParts := strings.Split(disk.SourceImage, "/")
d.Set("image", imageUrlParts[len(imageUrlParts)-1])
}
if disk.SourceSnapshot != "" {
snapshotUrlParts := strings.Split(disk.SourceSnapshot, "/")
d.Set("snapshot", snapshotUrlParts[len(snapshotUrlParts)-1])
}
d.Set("snapshot", disk.SourceSnapshot)
return nil
}

View File

@ -304,7 +304,7 @@ resource "google_compute_instance" "bar" {
zone = "us-central1-a"
disk {
image = "debian-8"
image = "debian-8-jessie-v20170523"
}
disk {