builder/googlecompute: fix dropped error (#8385)
This commit is contained in:
parent
ad74a87b5c
commit
3571c585bb
|
@ -493,6 +493,10 @@ func (d *driverGCE) createWindowsPassword(errCh chan<- error, name, zone string,
|
||||||
dCopy := string(data)
|
dCopy := string(data)
|
||||||
|
|
||||||
instance, err := d.service.Instances.Get(d.projectId, zone, name).Do()
|
instance, err := d.service.Instances.Get(d.projectId, zone, name).Do()
|
||||||
|
if err != nil {
|
||||||
|
errCh <- err
|
||||||
|
return
|
||||||
|
}
|
||||||
instance.Metadata.Items = append(instance.Metadata.Items, &compute.MetadataItems{Key: "windows-keys", Value: &dCopy})
|
instance.Metadata.Items = append(instance.Metadata.Items, &compute.MetadataItems{Key: "windows-keys", Value: &dCopy})
|
||||||
|
|
||||||
op, err := d.service.Instances.SetMetadata(d.projectId, zone, name, &compute.Metadata{
|
op, err := d.service.Instances.SetMetadata(d.projectId, zone, name, &compute.Metadata{
|
||||||
|
|
Loading…
Reference in New Issue