diff --git a/google/resource_compute_instance_test.go b/google/resource_compute_instance_test.go index 86391742b0c..5decac93030 100644 --- a/google/resource_compute_instance_test.go +++ b/google/resource_compute_instance_test.go @@ -815,7 +815,7 @@ func testAccCheckComputeInstanceDisk(instance *compute.Instance, source string, } for _, disk := range instance.Disks { - if strings.HasSuffix(disk.Source, source) && disk.AutoDelete == delete && disk.Boot == boot { + if strings.HasSuffix(disk.Source, "/"+source) && disk.AutoDelete == delete && disk.Boot == boot { return nil } }