Skip to content

Commit

Permalink
Use default disk type when no VM config zone given
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Buch committed Jul 6, 2018
1 parent fe0fc6b commit 61922b2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions backend/gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -911,13 +911,11 @@ func buildGCEImageSelector(selectorType string, cfg *config.ProviderConfig) (ima
func (p *gceProvider) buildInstance(ctx gocontext.Context, startAttributes *StartAttributes, imageLink, startupScript string) *compute.Instance {
logger := context.LoggerFromContext(ctx).WithField("self", "backend/gce_instance")

var (
zone *compute.Zone
err error
diskType string
)
var err error

zone := p.ic.Zone
diskType := p.ic.DiskType

zone = p.ic.Zone
if startAttributes.VMConfig.Zone != "" {
zone, err = p.client.Zones.Get(p.projectID, startAttributes.VMConfig.Zone).Context(ctx).Do()
if err != nil {
Expand Down

0 comments on commit 61922b2

Please sign in to comment.