diff --git a/builtin/providers/google/resource_compute_instance_template.go b/builtin/providers/google/resource_compute_instance_template.go index cf1103402ffd..060f4bb3934d 100644 --- a/builtin/providers/google/resource_compute_instance_template.go +++ b/builtin/providers/google/resource_compute_instance_template.go @@ -261,7 +261,7 @@ func buildDisks(d *schema.ResourceData, meta interface{}) ([]*compute.AttachedDi disk.InitializeParams.DiskName = v.(string) } if v, ok := d.GetOk(prefix + ".disk_size_gb"); ok { - disk.InitializeParams.DiskSizeGb = v.(int64) + disk.InitializeParams.DiskSizeGb = int64(v.(int)) } disk.InitializeParams.DiskType = "pd-standard" if v, ok := d.GetOk(prefix + ".disk_type"); ok { diff --git a/builtin/providers/google/resource_compute_instance_template_test.go b/builtin/providers/google/resource_compute_instance_template_test.go index c86ea205951d..e1688d9ea0f0 100644 --- a/builtin/providers/google/resource_compute_instance_template_test.go +++ b/builtin/providers/google/resource_compute_instance_template_test.go @@ -269,6 +269,7 @@ resource "google_compute_instance_template" "foobar" { disk { source_image = "debian-7-wheezy-v20140814" auto_delete = true + disk_size_gb = 100 boot = true }