provider/google: Update compute_disk to read after update, always set size (#15095)
This commit is contained in:
parent
258674a358
commit
3d1e60b504
|
@ -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
|
||||
}
|
||||
|
|
|
@ -304,7 +304,7 @@ resource "google_compute_instance" "bar" {
|
|||
zone = "us-central1-a"
|
||||
|
||||
disk {
|
||||
image = "debian-8"
|
||||
image = "debian-8-jessie-v20170523"
|
||||
}
|
||||
|
||||
disk {
|
||||
|
|
Loading…
Reference in New Issue