Fix canonical image (#978)

This commit is contained in:
Vincent Roseberry 2018-01-18 10:49:30 -08:00 committed by GitHub
parent 92b9984dae
commit 5043f60939
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -442,7 +442,8 @@ func getDiskFromAutoDeleteAndImage(config *Config, instance *compute.Instance, a
if err != nil {
return nil, err
}
canonicalImage := GetResourceNameFromSelfLink(img)
imgParts := strings.Split(img, "/projects/")
canonicalImage := imgParts[len(imgParts)-1]
for i, disk := range instance.Disks {
if disk.Boot == true || disk.Type == "SCRATCH" {