mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
Fix canonical image (#978)
This commit is contained in:
parent
92b9984dae
commit
5043f60939
@ -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" {
|
||||
|
Loading…
Reference in New Issue
Block a user