Fix digitalocean provider for private images [fixes mitchellh/packer#1792]
This commit is contained in:
parent
fc6b78b8dd
commit
d174ffe1fa
|
@ -138,8 +138,13 @@ func (d DigitalOceanClientV2) CreateDroplet(name string, size string, image stri
|
||||||
return 0, fmt.Errorf("Invalid region or lookup failure: '%s': %s", region, err)
|
return 0, fmt.Errorf("Invalid region or lookup failure: '%s': %s", region, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if found_image.Slug == "" {
|
||||||
|
req.Image = strconv.Itoa(int(found_image.Id))
|
||||||
|
} else {
|
||||||
|
req.Image = found_image.Slug
|
||||||
|
}
|
||||||
|
|
||||||
req.Size = found_size.Slug
|
req.Size = found_size.Slug
|
||||||
req.Image = found_image.Slug
|
|
||||||
req.Region = found_region.Slug
|
req.Region = found_region.Slug
|
||||||
req.SSHKeys = []string{fmt.Sprintf("%v", keyId)}
|
req.SSHKeys = []string{fmt.Sprintf("%v", keyId)}
|
||||||
req.PrivateNetworking = privateNetworking
|
req.PrivateNetworking = privateNetworking
|
||||||
|
|
Loading…
Reference in New Issue